@solana-mobile/dapp-store-cli 0.10.0 → 0.12.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 (35) 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 +24 -27
  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 +138 -259
  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 +32 -32
  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/CreateCliRelease.ts +10 -1
  27. package/src/commands/create/index.ts +0 -1
  28. package/src/commands/publish/PublishCliRemove.ts +1 -2
  29. package/src/commands/publish/PublishCliSubmit.ts +1 -2
  30. package/src/commands/publish/PublishCliSupport.ts +1 -2
  31. package/src/commands/publish/PublishCliUpdate.ts +1 -2
  32. package/src/config/PublishDetails.ts +30 -58
  33. package/src/prebuild_schema/publishing_source.yaml +32 -32
  34. package/lib/commands/create/CreateCliPublisher.js +0 -237
  35. package/src/commands/create/CreateCliPublisher.ts +0 -87
package/lib/CliSetup.js CHANGED
@@ -28,7 +28,7 @@ function _async_to_generator(fn) {
28
28
  };
29
29
  }
30
30
  function _ts_generator(thisArg, body) {
31
- var f, y, t, g, _ = {
31
+ var f, y, t, _ = {
32
32
  label: 0,
33
33
  sent: function() {
34
34
  if (t[0] & 1) throw t[1];
@@ -36,12 +36,8 @@ function _ts_generator(thisArg, body) {
36
36
  },
37
37
  trys: [],
38
38
  ops: []
39
- };
40
- return g = {
41
- next: verb(0),
42
- "throw": verb(1),
43
- "return": verb(2)
44
- }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
39
+ }, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
40
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() {
45
41
  return this;
46
42
  }), g;
47
43
  function verb(n) {
@@ -54,7 +50,7 @@ function _ts_generator(thisArg, body) {
54
50
  }
55
51
  function step(op) {
56
52
  if (f) throw new TypeError("Generator is already executing.");
57
- while(_)try {
53
+ while(g && (g = 0, op[0] && (_ = 0)), _)try {
58
54
  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;
59
55
  if (y = 0, t) op = [
60
56
  op[0] & 2,
@@ -124,10 +120,9 @@ function _ts_generator(thisArg, body) {
124
120
  }
125
121
  import { Command } from "commander";
126
122
  import { validateCommand } from "./commands/index.js";
127
- import { createAppCommand, createPublisherCommand, createReleaseCommand } from "./commands/create/index.js";
123
+ import { createAppCommand, createReleaseCommand } from "./commands/create/index.js";
128
124
  import { publishRemoveCommand, publishSubmitCommand, publishSupportCommand, publishUpdateCommand } from "./commands/publish/index.js";
129
125
  import { checkForSelfUpdate, checkSubmissionNetwork, Constants, alphaAppSubmissionMessage, dryRunSuccessMessage, generateNetworkSuffix, parseKeypair, showMessage, showNetworkWarningIfApplicable } from "./CliUtils.js";
130
- import { LAMPORTS_PER_SOL } from "@solana/web3.js";
131
126
  import * as dotenv from "dotenv";
132
127
  import { initScaffold } from "./commands/scaffolding/index.js";
133
128
  import { loadPublishDetails, loadPublishDetailsWithChecks } from "./config/PublishDetails.js";
@@ -153,19 +148,13 @@ function resolveBuildToolsPath(buildToolsPath) {
153
148
  * This method should be updated with each new release of the CLI, and just do nothing when there isn't anything to report
154
149
  */ function latestReleaseMessage() {
155
150
  var messages = [
156
- "- App details page now supports a Banner Graphic image of size 1200x600px and a Feature Graphic image of size 1200x1200px (optional)",
157
- "- App details page now supports video files. (mp4 file format only and minimum resolution 720p)",
158
- "- priority fee has been updated to ".concat(Constants.DEFAULT_PRIORITY_FEE, " lamports = ").concat(Constants.DEFAULT_PRIORITY_FEE / LAMPORTS_PER_SOL, ' SOL. To adjust this value use param "-p" or "--priority-fee-lamports"'),
159
- "- At least 4 screenshots are now required to update or release a new app",
160
- "- App icons should be exactly 512x512."
151
+ "- Banner Graphic image of size 1200x600px is now manadatory for publishing updates.",
152
+ "- Feature Graphic image of size 1200x1200px is required to be featured in Editor's choice carousel. (optional)"
161
153
  ].join('\n\n');
162
154
  showMessage("Publishing Tools Version ".concat(Constants.CLI_VERSION), messages, "warning");
163
155
  }
164
156
  function tryWithErrorMessage(block) {
165
- return _tryWithErrorMessage.apply(this, arguments);
166
- }
167
- function _tryWithErrorMessage() {
168
- _tryWithErrorMessage = _async_to_generator(function(block) {
157
+ return _async_to_generator(function() {
169
158
  var e, _e_message, errorMsg;
170
159
  return _ts_generator(this, function(_state) {
171
160
  switch(_state.label){
@@ -201,91 +190,28 @@ function _tryWithErrorMessage() {
201
190
  ];
202
191
  }
203
192
  });
204
- });
205
- return _tryWithErrorMessage.apply(this, arguments);
193
+ })();
206
194
  }
207
195
  mainCli.name("dapp-store").version(Constants.CLI_VERSION).description("CLI to assist with publishing to the Saga Dapp Store");
208
- export var initCliCmd = mainCli.command("init").description("First-time initialization of tooling configuration").action(/*#__PURE__*/ _async_to_generator(function() {
209
- return _ts_generator(this, function(_state) {
210
- switch(_state.label){
211
- case 0:
212
- return [
213
- 4,
214
- tryWithErrorMessage(/*#__PURE__*/ _async_to_generator(function() {
215
- var msg;
216
- return _ts_generator(this, function(_state) {
217
- msg = initScaffold();
218
- showMessage("Initialized", msg);
219
- return [
220
- 2
221
- ];
222
- });
223
- }))
224
- ];
225
- case 1:
226
- _state.sent();
227
- return [
228
- 2
229
- ];
230
- }
231
- });
232
- }));
233
- export var createCliCmd = mainCli.command("create").description("Create a `publisher`, `app`, or `release`");
234
- export var createPublisherCliCmd = createCliCmd.command("publisher").description("Create a publisher").requiredOption("-k, --keypair <path-to-keypair-file>", "Path to keypair file").option("-u, --url <url>", "RPC URL", Constants.DEFAULT_RPC_DEVNET).option("-d, --dry-run", "Flag for dry run. Doesn't mint an NFT").option("-s, --storage-config <storage-config>", "Provide alternative storage configuration details").option("-p, --priority-fee-lamports <priority-fee-lamports>", "Priority Fee lamports").action(/*#__PURE__*/ function() {
235
- var _ref = _async_to_generator(function(param) {
236
- var keypair, url, dryRun, storageConfig, priorityFeeLamports;
196
+ export var initCliCmd = mainCli.command("init").description("First-time initialization of tooling configuration").action(function() {
197
+ return _async_to_generator(function() {
237
198
  return _ts_generator(this, function(_state) {
238
199
  switch(_state.label){
239
200
  case 0:
240
- keypair = param.keypair, url = param.url, dryRun = param.dryRun, storageConfig = param.storageConfig, priorityFeeLamports = param.priorityFeeLamports;
241
201
  return [
242
202
  4,
243
- tryWithErrorMessage(/*#__PURE__*/ _async_to_generator(function() {
244
- var signer, result, displayUrl, transactionUrl, resultText;
245
- return _ts_generator(this, function(_state) {
246
- switch(_state.label){
247
- case 0:
248
- showNetworkWarningIfApplicable(url);
249
- latestReleaseMessage();
250
- return [
251
- 4,
252
- checkForSelfUpdate()
253
- ];
254
- case 1:
255
- _state.sent();
256
- signer = parseKeypair(keypair);
257
- if (!signer) return [
258
- 3,
259
- 3
260
- ];
261
- return [
262
- 4,
263
- createPublisherCommand({
264
- signer: signer,
265
- url: url,
266
- dryRun: dryRun,
267
- storageParams: storageConfig,
268
- priorityFeeLamports: priorityFeeLamports
269
- })
270
- ];
271
- case 2:
272
- result = _state.sent();
273
- if (dryRun) {
274
- dryRunSuccessMessage();
275
- } else {
276
- displayUrl = "https://explorer.solana.com/address/".concat(result.publisherAddress).concat(generateNetworkSuffix(url));
277
- transactionUrl = "https://explorer.solana.com/tx/".concat(result.transactionSignature).concat(generateNetworkSuffix(url));
278
- resultText = "Publisher NFT successfully minted successfully:\n".concat(displayUrl, "\n").concat(transactionUrl);
279
- showMessage("Success", resultText);
280
- }
281
- _state.label = 3;
282
- case 3:
283
- return [
284
- 2
285
- ];
286
- }
287
- });
288
- }))
203
+ tryWithErrorMessage(function() {
204
+ return _async_to_generator(function() {
205
+ var msg;
206
+ return _ts_generator(this, function(_state) {
207
+ msg = initScaffold();
208
+ showMessage("Initialized", msg);
209
+ return [
210
+ 2
211
+ ];
212
+ });
213
+ })();
214
+ })
289
215
  ];
290
216
  case 1:
291
217
  _state.sent();
@@ -294,76 +220,65 @@ export var createPublisherCliCmd = createCliCmd.command("publisher").description
294
220
  ];
295
221
  }
296
222
  });
297
- });
298
- return function(_) {
299
- return _ref.apply(this, arguments);
300
- };
301
- }());
302
- export var createAppCliCmd = createCliCmd.command("app").description("Create a app").requiredOption("-k, --keypair <path-to-keypair-file>", "Path to keypair file").option("-p, --publisher-mint-address <publisher-mint-address>", "The mint address of the publisher NFT").option("-u, --url <url>", "RPC URL", Constants.DEFAULT_RPC_DEVNET).option("-d, --dry-run", "Flag for dry run. Doesn't mint an NFT").option("-s, --storage-config <storage-config>", "Provide alternative storage configuration details").option("-p, --priority-fee-lamports <priority-fee-lamports>", "Priority Fee lamports").action(/*#__PURE__*/ function() {
303
- var _ref = _async_to_generator(function(param) {
304
- var publisherMintAddress, keypair, url, dryRun, storageConfig, priorityFeeLamports;
223
+ })();
224
+ });
225
+ export var createCliCmd = mainCli.command("create").description("Create a `app`, or `release`");
226
+ export var createAppCliCmd = createCliCmd.command("app").description("Create a app").requiredOption("-k, --keypair <path-to-keypair-file>", "Path to keypair file").option("-u, --url <url>", "RPC URL", Constants.DEFAULT_RPC_DEVNET).option("-d, --dry-run", "Flag for dry run. Doesn't mint an NFT").option("-s, --storage-config <storage-config>", "Provide alternative storage configuration details").option("-p, --priority-fee-lamports <priority-fee-lamports>", "Priority Fee lamports").action(function(param) {
227
+ var keypair = param.keypair, url = param.url, dryRun = param.dryRun, storageConfig = param.storageConfig, priorityFeeLamports = param.priorityFeeLamports;
228
+ return _async_to_generator(function() {
305
229
  return _ts_generator(this, function(_state) {
306
230
  switch(_state.label){
307
231
  case 0:
308
- publisherMintAddress = param.publisherMintAddress, keypair = param.keypair, url = param.url, dryRun = param.dryRun, storageConfig = param.storageConfig, priorityFeeLamports = param.priorityFeeLamports;
309
232
  return [
310
233
  4,
311
- tryWithErrorMessage(/*#__PURE__*/ _async_to_generator(function() {
312
- var config, signer, result, displayUrl, transactionUrl, resultText;
313
- return _ts_generator(this, function(_state) {
314
- switch(_state.label){
315
- case 0:
316
- showNetworkWarningIfApplicable(url);
317
- latestReleaseMessage();
318
- return [
319
- 4,
320
- checkForSelfUpdate()
321
- ];
322
- case 1:
323
- _state.sent();
324
- return [
325
- 4,
326
- loadPublishDetailsWithChecks()
327
- ];
328
- case 2:
329
- config = _state.sent();
330
- if (!hasAddressInConfig(config.publisher) && !publisherMintAddress) {
331
- throw new Error("Either specify a publisher mint address in the config file or specify as a CLI argument to this command.");
332
- }
333
- signer = parseKeypair(keypair);
334
- if (!signer) return [
335
- 3,
336
- 4
337
- ];
338
- return [
339
- 4,
340
- createAppCommand({
341
- publisherMintAddress: publisherMintAddress,
342
- signer: signer,
343
- url: url,
344
- dryRun: dryRun,
345
- storageParams: storageConfig,
346
- priorityFeeLamports: priorityFeeLamports
347
- })
348
- ];
349
- case 3:
350
- result = _state.sent();
351
- if (dryRun) {
352
- dryRunSuccessMessage();
353
- } else {
354
- displayUrl = "https://explorer.solana.com/address/".concat(result.appAddress).concat(generateNetworkSuffix(url));
355
- transactionUrl = "https://explorer.solana.com/tx/".concat(result.transactionSignature).concat(generateNetworkSuffix(url));
356
- resultText = "App NFT successfully minted:\n".concat(displayUrl, "\n").concat(transactionUrl);
357
- showMessage("Success", resultText);
358
- }
359
- _state.label = 4;
360
- case 4:
361
- return [
362
- 2
363
- ];
364
- }
365
- });
366
- }))
234
+ tryWithErrorMessage(function() {
235
+ return _async_to_generator(function() {
236
+ var signer, result, displayUrl, transactionUrl, resultText;
237
+ return _ts_generator(this, function(_state) {
238
+ switch(_state.label){
239
+ case 0:
240
+ showNetworkWarningIfApplicable(url);
241
+ latestReleaseMessage();
242
+ return [
243
+ 4,
244
+ checkForSelfUpdate()
245
+ ];
246
+ case 1:
247
+ _state.sent();
248
+ signer = parseKeypair(keypair);
249
+ if (!signer) return [
250
+ 3,
251
+ 3
252
+ ];
253
+ return [
254
+ 4,
255
+ createAppCommand({
256
+ signer: signer,
257
+ url: url,
258
+ dryRun: dryRun,
259
+ storageParams: storageConfig,
260
+ priorityFeeLamports: priorityFeeLamports
261
+ })
262
+ ];
263
+ case 2:
264
+ result = _state.sent();
265
+ if (dryRun) {
266
+ dryRunSuccessMessage();
267
+ } else {
268
+ displayUrl = "https://explorer.solana.com/address/".concat(result.appAddress).concat(generateNetworkSuffix(url));
269
+ transactionUrl = "https://explorer.solana.com/tx/".concat(result.transactionSignature).concat(generateNetworkSuffix(url));
270
+ resultText = "App NFT successfully minted:\n".concat(displayUrl, "\n").concat(transactionUrl);
271
+ showMessage("Success", resultText);
272
+ }
273
+ _state.label = 3;
274
+ case 3:
275
+ return [
276
+ 2
277
+ ];
278
+ }
279
+ });
280
+ })();
281
+ })
367
282
  ];
368
283
  case 1:
369
284
  _state.sent();
@@ -372,81 +287,79 @@ export var createAppCliCmd = createCliCmd.command("app").description("Create a a
372
287
  ];
373
288
  }
374
289
  });
375
- });
376
- return function(_) {
377
- return _ref.apply(this, arguments);
378
- };
379
- }());
380
- export var createReleaseCliCmd = createCliCmd.command("release").description("Create a release").requiredOption("-k, --keypair <path-to-keypair-file>", "Path to keypair file").option("-a, --app-mint-address <app-mint-address>", "The mint address of the app NFT").option("-u, --url <url>", "RPC URL", Constants.DEFAULT_RPC_DEVNET).option("-d, --dry-run", "Flag for dry run. Doesn't mint an NFT").option("-b, --build-tools-path <build-tools-path>", "Path to Android build tools which contains AAPT2").option("-s, --storage-config <storage-config>", "Provide alternative storage configuration details").option("-p, --priority-fee-lamports <priority-fee-lamports>", "Priority Fee lamports").action(/*#__PURE__*/ function() {
381
- var _ref = _async_to_generator(function(param) {
382
- var appMintAddress, keypair, url, dryRun, buildToolsPath, storageConfig, priorityFeeLamports;
290
+ })();
291
+ });
292
+ export var createReleaseCliCmd = createCliCmd.command("release").description("Create a release").requiredOption("-k, --keypair <path-to-keypair-file>", "Path to keypair file").option("-a, --app-mint-address <app-mint-address>", "The mint address of the app NFT").option("-u, --url <url>", "RPC URL", Constants.DEFAULT_RPC_DEVNET).option("-d, --dry-run", "Flag for dry run. Doesn't mint an NFT").option("-b, --build-tools-path <build-tools-path>", "Path to Android build tools which contains AAPT2").option("-s, --storage-config <storage-config>", "Provide alternative storage configuration details").option("-p, --priority-fee-lamports <priority-fee-lamports>", "Priority Fee lamports").action(function(param) {
293
+ var appMintAddress = param.appMintAddress, keypair = param.keypair, url = param.url, dryRun = param.dryRun, buildToolsPath = param.buildToolsPath, storageConfig = param.storageConfig, priorityFeeLamports = param.priorityFeeLamports;
294
+ return _async_to_generator(function() {
383
295
  return _ts_generator(this, function(_state) {
384
296
  switch(_state.label){
385
297
  case 0:
386
- appMintAddress = param.appMintAddress, keypair = param.keypair, url = param.url, dryRun = param.dryRun, buildToolsPath = param.buildToolsPath, storageConfig = param.storageConfig, priorityFeeLamports = param.priorityFeeLamports;
387
298
  return [
388
299
  4,
389
- tryWithErrorMessage(/*#__PURE__*/ _async_to_generator(function() {
390
- var resolvedBuildToolsPath, config, signer, result, displayUrl, transactionUrl, resultText;
391
- return _ts_generator(this, function(_state) {
392
- switch(_state.label){
393
- case 0:
394
- showNetworkWarningIfApplicable(url);
395
- latestReleaseMessage();
396
- return [
397
- 4,
398
- checkForSelfUpdate()
399
- ];
400
- case 1:
401
- _state.sent();
402
- resolvedBuildToolsPath = resolveBuildToolsPath(buildToolsPath);
403
- if (resolvedBuildToolsPath === undefined) {
404
- throw new Error("Please specify an Android build tools directory in the .env file or via the command line argument.");
405
- }
406
- return [
407
- 4,
408
- loadPublishDetailsWithChecks()
409
- ];
410
- case 2:
411
- config = _state.sent();
412
- if (!hasAddressInConfig(config.app) && !appMintAddress) {
413
- throw new Error("Either specify an app mint address in the config file or specify as a CLI argument to this command");
414
- }
415
- signer = parseKeypair(keypair);
416
- if (!signer) return [
417
- 3,
418
- 4
419
- ];
420
- return [
421
- 4,
422
- createReleaseCommand({
423
- appMintAddress: appMintAddress,
424
- buildToolsPath: resolvedBuildToolsPath,
425
- signer: signer,
426
- url: url,
427
- dryRun: dryRun,
428
- storageParams: storageConfig,
429
- priorityFeeLamports: priorityFeeLamports
430
- })
431
- ];
432
- case 3:
433
- result = _state.sent();
434
- if (dryRun) {
435
- dryRunSuccessMessage();
436
- } else {
437
- displayUrl = "https://explorer.solana.com/address/".concat(result === null || result === void 0 ? void 0 : result.releaseAddress).concat(generateNetworkSuffix(url));
438
- transactionUrl = "https://explorer.solana.com/tx/".concat(result.transactionSignature).concat(generateNetworkSuffix(url));
439
- resultText = "Release NFT successfully minted:\n".concat(displayUrl, "\n").concat(transactionUrl);
440
- showMessage("Success", resultText);
441
- }
442
- _state.label = 4;
443
- case 4:
444
- return [
445
- 2
446
- ];
447
- }
448
- });
449
- }))
300
+ tryWithErrorMessage(function() {
301
+ return _async_to_generator(function() {
302
+ var resolvedBuildToolsPath, config, signer, result, displayUrl, transactionUrl, resultText;
303
+ return _ts_generator(this, function(_state) {
304
+ switch(_state.label){
305
+ case 0:
306
+ showNetworkWarningIfApplicable(url);
307
+ latestReleaseMessage();
308
+ return [
309
+ 4,
310
+ checkForSelfUpdate()
311
+ ];
312
+ case 1:
313
+ _state.sent();
314
+ resolvedBuildToolsPath = resolveBuildToolsPath(buildToolsPath);
315
+ if (resolvedBuildToolsPath === undefined) {
316
+ throw new Error("Please specify an Android build tools directory in the .env file or via the command line argument.");
317
+ }
318
+ return [
319
+ 4,
320
+ loadPublishDetailsWithChecks()
321
+ ];
322
+ case 2:
323
+ config = _state.sent();
324
+ if (!hasAddressInConfig(config.app) && !appMintAddress) {
325
+ throw new Error("Either specify an app mint address in the config file or specify as a CLI argument to this command");
326
+ }
327
+ signer = parseKeypair(keypair);
328
+ if (!signer) return [
329
+ 3,
330
+ 4
331
+ ];
332
+ return [
333
+ 4,
334
+ createReleaseCommand({
335
+ appMintAddress: appMintAddress,
336
+ buildToolsPath: resolvedBuildToolsPath,
337
+ signer: signer,
338
+ url: url,
339
+ dryRun: dryRun,
340
+ storageParams: storageConfig,
341
+ priorityFeeLamports: priorityFeeLamports
342
+ })
343
+ ];
344
+ case 3:
345
+ result = _state.sent();
346
+ if (dryRun) {
347
+ dryRunSuccessMessage();
348
+ } else {
349
+ displayUrl = "https://explorer.solana.com/address/".concat(result === null || result === void 0 ? void 0 : result.releaseAddress).concat(generateNetworkSuffix(url));
350
+ transactionUrl = "https://explorer.solana.com/tx/".concat(result.transactionSignature).concat(generateNetworkSuffix(url));
351
+ resultText = "Release NFT successfully minted:\n".concat(displayUrl, "\n").concat(transactionUrl);
352
+ showMessage("Success", resultText);
353
+ }
354
+ _state.label = 4;
355
+ case 4:
356
+ return [
357
+ 2
358
+ ];
359
+ }
360
+ });
361
+ })();
362
+ })
450
363
  ];
451
364
  case 1:
452
365
  _state.sent();
@@ -455,58 +368,56 @@ export var createReleaseCliCmd = createCliCmd.command("release").description("Cr
455
368
  ];
456
369
  }
457
370
  });
458
- });
459
- return function(_) {
460
- return _ref.apply(this, arguments);
461
- };
462
- }());
463
- mainCli.command("validate").description("Validates details prior to publishing").requiredOption("-k, --keypair <path-to-keypair-file>", "Path to keypair file").option("-b, --build-tools-path <build-tools-path>", "Path to Android build tools which contains AAPT2").action(/*#__PURE__*/ function() {
464
- var _ref = _async_to_generator(function(param) {
465
- var keypair, buildToolsPath;
371
+ })();
372
+ });
373
+ mainCli.command("validate").description("Validates details prior to publishing").requiredOption("-k, --keypair <path-to-keypair-file>", "Path to keypair file").option("-b, --build-tools-path <build-tools-path>", "Path to Android build tools which contains AAPT2").action(function(param) {
374
+ var keypair = param.keypair, buildToolsPath = param.buildToolsPath;
375
+ return _async_to_generator(function() {
466
376
  return _ts_generator(this, function(_state) {
467
377
  switch(_state.label){
468
378
  case 0:
469
- keypair = param.keypair, buildToolsPath = param.buildToolsPath;
470
379
  return [
471
380
  4,
472
- tryWithErrorMessage(/*#__PURE__*/ _async_to_generator(function() {
473
- var resolvedBuildToolsPath, signer;
474
- return _ts_generator(this, function(_state) {
475
- switch(_state.label){
476
- case 0:
477
- latestReleaseMessage();
478
- return [
479
- 4,
480
- checkForSelfUpdate()
481
- ];
482
- case 1:
483
- _state.sent();
484
- resolvedBuildToolsPath = resolveBuildToolsPath(buildToolsPath);
485
- if (resolvedBuildToolsPath === undefined) {
486
- throw new Error("Please specify an Android build tools directory in the .env file or via the command line argument.");
487
- }
488
- signer = parseKeypair(keypair);
489
- if (!signer) return [
490
- 3,
491
- 3
492
- ];
493
- return [
494
- 4,
495
- validateCommand({
496
- signer: signer,
497
- buildToolsPath: resolvedBuildToolsPath
498
- })
499
- ];
500
- case 2:
501
- _state.sent();
502
- _state.label = 3;
503
- case 3:
504
- return [
505
- 2
506
- ];
507
- }
508
- });
509
- }))
381
+ tryWithErrorMessage(function() {
382
+ return _async_to_generator(function() {
383
+ var resolvedBuildToolsPath, signer;
384
+ return _ts_generator(this, function(_state) {
385
+ switch(_state.label){
386
+ case 0:
387
+ latestReleaseMessage();
388
+ return [
389
+ 4,
390
+ checkForSelfUpdate()
391
+ ];
392
+ case 1:
393
+ _state.sent();
394
+ resolvedBuildToolsPath = resolveBuildToolsPath(buildToolsPath);
395
+ if (resolvedBuildToolsPath === undefined) {
396
+ throw new Error("Please specify an Android build tools directory in the .env file or via the command line argument.");
397
+ }
398
+ signer = parseKeypair(keypair);
399
+ if (!signer) return [
400
+ 3,
401
+ 3
402
+ ];
403
+ return [
404
+ 4,
405
+ validateCommand({
406
+ signer: signer,
407
+ buildToolsPath: resolvedBuildToolsPath
408
+ })
409
+ ];
410
+ case 2:
411
+ _state.sent();
412
+ _state.label = 3;
413
+ case 3:
414
+ return [
415
+ 2
416
+ ];
417
+ }
418
+ });
419
+ })();
420
+ })
510
421
  ];
511
422
  case 1:
512
423
  _state.sent();
@@ -515,105 +426,103 @@ mainCli.command("validate").description("Validates details prior to publishing")
515
426
  ];
516
427
  }
517
428
  });
518
- });
519
- return function(_) {
520
- return _ref.apply(this, arguments);
521
- };
522
- }());
429
+ })();
430
+ });
523
431
  var publishCommand = mainCli.command("publish").description("Submit a publishing request (`submit`, `update`, `remove`, or `support`) to the Solana Mobile dApp publisher portal");
524
- publishCommand.command("submit").description("Submit a new app to the Solana Mobile dApp publisher portal").requiredOption("-k, --keypair <path-to-keypair-file>", "Path to keypair file").requiredOption("--complies-with-solana-dapp-store-policies", "An attestation that the app complies with the Solana dApp Store policies").requiredOption("--requestor-is-authorized", "An attestation that the party making this Solana dApp publisher portal request is authorized to do so").option("-a, --app-mint-address <app-mint-address>", "The mint address of the app NFT. If not specified, the value from your config file will be used.").option("-r, --release-mint-address <release-mint-address>", "The mint address of the release NFT. If not specified, the value from your config file will be used.").option("-u, --url <url>", "RPC URL", Constants.DEFAULT_RPC_DEVNET).option("-d, --dry-run", "Flag for dry run. Doesn't submit the request to the publisher portal.").option("-l, --alpha", "Flag to mark the submission as alpha test.").action(/*#__PURE__*/ function() {
525
- var _ref = _async_to_generator(function(param) {
526
- var appMintAddress, releaseMintAddress, keypair, url, compliesWithSolanaDappStorePolicies, requestorIsAuthorized, dryRun, alpha;
432
+ publishCommand.command("submit").description("Submit a new app to the Solana Mobile dApp publisher portal").requiredOption("-k, --keypair <path-to-keypair-file>", "Path to keypair file").requiredOption("--complies-with-solana-dapp-store-policies", "An attestation that the app complies with the Solana dApp Store policies").requiredOption("--requestor-is-authorized", "An attestation that the party making this Solana dApp publisher portal request is authorized to do so").option("-a, --app-mint-address <app-mint-address>", "The mint address of the app NFT. If not specified, the value from your config file will be used.").option("-r, --release-mint-address <release-mint-address>", "The mint address of the release NFT. If not specified, the value from your config file will be used.").option("-u, --url <url>", "RPC URL", Constants.DEFAULT_RPC_DEVNET).option("-d, --dry-run", "Flag for dry run. Doesn't submit the request to the publisher portal.").option("-l, --alpha", "Flag to mark the submission as alpha test.").action(function(param) {
433
+ var appMintAddress = param.appMintAddress, releaseMintAddress = param.releaseMintAddress, keypair = param.keypair, url = param.url, compliesWithSolanaDappStorePolicies = param.compliesWithSolanaDappStorePolicies, requestorIsAuthorized = param.requestorIsAuthorized, dryRun = param.dryRun, alpha = param.alpha;
434
+ return _async_to_generator(function() {
527
435
  return _ts_generator(this, function(_state) {
528
436
  switch(_state.label){
529
437
  case 0:
530
- appMintAddress = param.appMintAddress, releaseMintAddress = param.releaseMintAddress, keypair = param.keypair, url = param.url, compliesWithSolanaDappStorePolicies = param.compliesWithSolanaDappStorePolicies, requestorIsAuthorized = param.requestorIsAuthorized, dryRun = param.dryRun, alpha = param.alpha;
531
438
  return [
532
439
  4,
533
- tryWithErrorMessage(/*#__PURE__*/ _async_to_generator(function() {
534
- var config, signer;
535
- return _ts_generator(this, function(_state) {
536
- switch(_state.label){
537
- case 0:
538
- return [
539
- 4,
540
- checkForSelfUpdate()
541
- ];
542
- case 1:
543
- _state.sent();
544
- checkSubmissionNetwork(url);
545
- return [
546
- 4,
547
- loadPublishDetails(Constants.getConfigFilePath())
548
- ];
549
- case 2:
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
- if (alpha) {
555
- alphaAppSubmissionMessage();
556
- }
557
- signer = parseKeypair(keypair);
558
- if (!signer) return [
559
- 3,
560
- 7
561
- ];
562
- if (!(config.lastUpdatedVersionOnStore != null && config.lastSubmittedVersionOnChain.address != null)) return [
563
- 3,
564
- 4
565
- ];
566
- return [
567
- 4,
568
- publishUpdateCommand({
569
- appMintAddress: appMintAddress,
570
- releaseMintAddress: releaseMintAddress,
571
- signer: signer,
572
- url: url,
573
- dryRun: dryRun,
574
- compliesWithSolanaDappStorePolicies: compliesWithSolanaDappStorePolicies,
575
- requestorIsAuthorized: requestorIsAuthorized,
576
- critical: false,
577
- alphaTest: alpha
578
- })
579
- ];
580
- case 3:
581
- _state.sent();
582
- return [
583
- 3,
584
- 6
585
- ];
586
- case 4:
587
- return [
588
- 4,
589
- publishSubmitCommand({
590
- appMintAddress: appMintAddress,
591
- releaseMintAddress: releaseMintAddress,
592
- signer: signer,
593
- url: url,
594
- dryRun: dryRun,
595
- compliesWithSolanaDappStorePolicies: compliesWithSolanaDappStorePolicies,
596
- requestorIsAuthorized: requestorIsAuthorized,
597
- alphaTest: alpha
598
- })
599
- ];
600
- case 5:
601
- _state.sent();
602
- _state.label = 6;
603
- case 6:
604
- if (dryRun) {
605
- dryRunSuccessMessage();
606
- } else {
607
- showMessage("Success", "Successfully submitted to the Solana Mobile dApp publisher portal");
608
- }
609
- _state.label = 7;
610
- case 7:
611
- return [
612
- 2
613
- ];
614
- }
615
- });
616
- }))
440
+ tryWithErrorMessage(function() {
441
+ return _async_to_generator(function() {
442
+ var config, signer;
443
+ return _ts_generator(this, function(_state) {
444
+ switch(_state.label){
445
+ case 0:
446
+ return [
447
+ 4,
448
+ checkForSelfUpdate()
449
+ ];
450
+ case 1:
451
+ _state.sent();
452
+ checkSubmissionNetwork(url);
453
+ return [
454
+ 4,
455
+ loadPublishDetails(Constants.getConfigFilePath())
456
+ ];
457
+ case 2:
458
+ config = _state.sent();
459
+ if (!hasAddressInConfig(config.release) && !releaseMintAddress) {
460
+ throw new Error("Either specify a release mint address in the config file or specify as a CLI argument to this command.");
461
+ }
462
+ if (alpha) {
463
+ alphaAppSubmissionMessage();
464
+ }
465
+ signer = parseKeypair(keypair);
466
+ if (!signer) return [
467
+ 3,
468
+ 7
469
+ ];
470
+ if (!(config.lastUpdatedVersionOnStore != null && config.lastSubmittedVersionOnChain.address != null)) return [
471
+ 3,
472
+ 4
473
+ ];
474
+ return [
475
+ 4,
476
+ publishUpdateCommand({
477
+ appMintAddress: appMintAddress,
478
+ releaseMintAddress: releaseMintAddress,
479
+ signer: signer,
480
+ url: url,
481
+ dryRun: dryRun,
482
+ compliesWithSolanaDappStorePolicies: compliesWithSolanaDappStorePolicies,
483
+ requestorIsAuthorized: requestorIsAuthorized,
484
+ critical: false,
485
+ alphaTest: alpha
486
+ })
487
+ ];
488
+ case 3:
489
+ _state.sent();
490
+ return [
491
+ 3,
492
+ 6
493
+ ];
494
+ case 4:
495
+ return [
496
+ 4,
497
+ publishSubmitCommand({
498
+ appMintAddress: appMintAddress,
499
+ releaseMintAddress: releaseMintAddress,
500
+ signer: signer,
501
+ url: url,
502
+ dryRun: dryRun,
503
+ compliesWithSolanaDappStorePolicies: compliesWithSolanaDappStorePolicies,
504
+ requestorIsAuthorized: requestorIsAuthorized,
505
+ alphaTest: alpha
506
+ })
507
+ ];
508
+ case 5:
509
+ _state.sent();
510
+ _state.label = 6;
511
+ case 6:
512
+ if (dryRun) {
513
+ dryRunSuccessMessage();
514
+ } else {
515
+ showMessage("Success", "Successfully submitted to the Solana Mobile dApp publisher portal");
516
+ }
517
+ _state.label = 7;
518
+ case 7:
519
+ return [
520
+ 2
521
+ ];
522
+ }
523
+ });
524
+ })();
525
+ })
617
526
  ];
618
527
  case 1:
619
528
  _state.sent();
@@ -622,78 +531,76 @@ publishCommand.command("submit").description("Submit a new app to the Solana Mob
622
531
  ];
623
532
  }
624
533
  });
625
- });
626
- return function(_) {
627
- return _ref.apply(this, arguments);
628
- };
629
- }());
630
- publishCommand.command("update").description("Update an existing app on the Solana Mobile dApp publisher portal").requiredOption("-k, --keypair <path-to-keypair-file>", "Path to keypair file").requiredOption("--complies-with-solana-dapp-store-policies", "An attestation that the app complies with the Solana dApp Store policies").requiredOption("--requestor-is-authorized", "An attestation that the party making this Solana dApp publisher portal request is authorized to do so").option("-a, --app-mint-address <app-mint-address>", "The mint address of the app NFT. If not specified, the value from your config file will be used.").option("-r, --release-mint-address <release-mint-address>", "The mint address of the release NFT. If not specified, the value from your config file will be used.").option("-c, --critical", "Flag for a critical app update request").option("-u, --url <url>", "RPC URL", Constants.DEFAULT_RPC_DEVNET).option("-d, --dry-run", "Flag for dry run. Doesn't submit the request to the publisher portal.").option("-l, --alpha", "Flag to mark the submission as alpha test.").action(/*#__PURE__*/ function() {
631
- var _ref = _async_to_generator(function(param) {
632
- var appMintAddress, releaseMintAddress, keypair, url, compliesWithSolanaDappStorePolicies, requestorIsAuthorized, critical, dryRun, alpha;
534
+ })();
535
+ });
536
+ publishCommand.command("update").description("Update an existing app on the Solana Mobile dApp publisher portal").requiredOption("-k, --keypair <path-to-keypair-file>", "Path to keypair file").requiredOption("--complies-with-solana-dapp-store-policies", "An attestation that the app complies with the Solana dApp Store policies").requiredOption("--requestor-is-authorized", "An attestation that the party making this Solana dApp publisher portal request is authorized to do so").option("-a, --app-mint-address <app-mint-address>", "The mint address of the app NFT. If not specified, the value from your config file will be used.").option("-r, --release-mint-address <release-mint-address>", "The mint address of the release NFT. If not specified, the value from your config file will be used.").option("-c, --critical", "Flag for a critical app update request").option("-u, --url <url>", "RPC URL", Constants.DEFAULT_RPC_DEVNET).option("-d, --dry-run", "Flag for dry run. Doesn't submit the request to the publisher portal.").option("-l, --alpha", "Flag to mark the submission as alpha test.").action(function(param) {
537
+ var appMintAddress = param.appMintAddress, releaseMintAddress = param.releaseMintAddress, keypair = param.keypair, url = param.url, compliesWithSolanaDappStorePolicies = param.compliesWithSolanaDappStorePolicies, requestorIsAuthorized = param.requestorIsAuthorized, critical = param.critical, dryRun = param.dryRun, alpha = param.alpha;
538
+ return _async_to_generator(function() {
633
539
  return _ts_generator(this, function(_state) {
634
540
  switch(_state.label){
635
541
  case 0:
636
- appMintAddress = param.appMintAddress, releaseMintAddress = param.releaseMintAddress, keypair = param.keypair, url = param.url, compliesWithSolanaDappStorePolicies = param.compliesWithSolanaDappStorePolicies, requestorIsAuthorized = param.requestorIsAuthorized, critical = param.critical, dryRun = param.dryRun, alpha = param.alpha;
637
542
  return [
638
543
  4,
639
- tryWithErrorMessage(/*#__PURE__*/ _async_to_generator(function() {
640
- var config, signer;
641
- return _ts_generator(this, function(_state) {
642
- switch(_state.label){
643
- case 0:
644
- return [
645
- 4,
646
- checkForSelfUpdate()
647
- ];
648
- case 1:
649
- _state.sent();
650
- checkSubmissionNetwork(url);
651
- return [
652
- 4,
653
- loadPublishDetails(Constants.getConfigFilePath())
654
- ];
655
- case 2:
656
- config = _state.sent();
657
- if (!hasAddressInConfig(config.release) && !releaseMintAddress) {
658
- throw new Error("Either specify a release mint address in the config file or specify as a CLI argument to this command.");
659
- }
660
- if (alpha) {
661
- alphaAppSubmissionMessage();
662
- }
663
- signer = parseKeypair(keypair);
664
- if (!signer) return [
665
- 3,
666
- 4
667
- ];
668
- return [
669
- 4,
670
- publishUpdateCommand({
671
- appMintAddress: appMintAddress,
672
- releaseMintAddress: releaseMintAddress,
673
- signer: signer,
674
- url: url,
675
- dryRun: dryRun,
676
- compliesWithSolanaDappStorePolicies: compliesWithSolanaDappStorePolicies,
677
- requestorIsAuthorized: requestorIsAuthorized,
678
- critical: critical,
679
- alphaTest: alpha
680
- })
681
- ];
682
- case 3:
683
- _state.sent();
684
- if (dryRun) {
685
- dryRunSuccessMessage();
686
- } else {
687
- showMessage("Success", "dApp successfully updated on the publisher portal");
688
- }
689
- _state.label = 4;
690
- case 4:
691
- return [
692
- 2
693
- ];
694
- }
695
- });
696
- }))
544
+ tryWithErrorMessage(function() {
545
+ return _async_to_generator(function() {
546
+ var config, signer;
547
+ return _ts_generator(this, function(_state) {
548
+ switch(_state.label){
549
+ case 0:
550
+ return [
551
+ 4,
552
+ checkForSelfUpdate()
553
+ ];
554
+ case 1:
555
+ _state.sent();
556
+ checkSubmissionNetwork(url);
557
+ return [
558
+ 4,
559
+ loadPublishDetails(Constants.getConfigFilePath())
560
+ ];
561
+ case 2:
562
+ config = _state.sent();
563
+ if (!hasAddressInConfig(config.release) && !releaseMintAddress) {
564
+ throw new Error("Either specify a release mint address in the config file or specify as a CLI argument to this command.");
565
+ }
566
+ if (alpha) {
567
+ alphaAppSubmissionMessage();
568
+ }
569
+ signer = parseKeypair(keypair);
570
+ if (!signer) return [
571
+ 3,
572
+ 4
573
+ ];
574
+ return [
575
+ 4,
576
+ publishUpdateCommand({
577
+ appMintAddress: appMintAddress,
578
+ releaseMintAddress: releaseMintAddress,
579
+ signer: signer,
580
+ url: url,
581
+ dryRun: dryRun,
582
+ compliesWithSolanaDappStorePolicies: compliesWithSolanaDappStorePolicies,
583
+ requestorIsAuthorized: requestorIsAuthorized,
584
+ critical: critical,
585
+ alphaTest: alpha
586
+ })
587
+ ];
588
+ case 3:
589
+ _state.sent();
590
+ if (dryRun) {
591
+ dryRunSuccessMessage();
592
+ } else {
593
+ showMessage("Success", "dApp successfully updated on the publisher portal");
594
+ }
595
+ _state.label = 4;
596
+ case 4:
597
+ return [
598
+ 2
599
+ ];
600
+ }
601
+ });
602
+ })();
603
+ })
697
604
  ];
698
605
  case 1:
699
606
  _state.sent();
@@ -702,73 +609,71 @@ publishCommand.command("update").description("Update an existing app on the Sola
702
609
  ];
703
610
  }
704
611
  });
705
- });
706
- return function(_) {
707
- return _ref.apply(this, arguments);
708
- };
709
- }());
710
- publishCommand.command("remove").description("Remove an existing app from the Solana Mobile dApp publisher portal").requiredOption("-k, --keypair <path-to-keypair-file>", "Path to keypair file").requiredOption("--requestor-is-authorized", "An attestation that the party making this Solana dApp publisher portal request is authorized to do so").option("-a, --app-mint-address <app-mint-address>", "The mint address of the app NFT. If not specified, the value from your config file will be used.").option("-r, --release-mint-address <release-mint-address>", "The mint address of the release NFT. If not specified, the value from your config file will be used.").option("-c, --critical", "Flag for a critical app removal request").option("-u, --url <url>", "RPC URL", Constants.DEFAULT_RPC_DEVNET).option("-d, --dry-run", "Flag for dry run. Doesn't submit the request to the publisher portal.").action(/*#__PURE__*/ function() {
711
- var _ref = _async_to_generator(function(param) {
712
- var appMintAddress, releaseMintAddress, keypair, url, requestorIsAuthorized, critical, dryRun;
612
+ })();
613
+ });
614
+ publishCommand.command("remove").description("Remove an existing app from the Solana Mobile dApp publisher portal").requiredOption("-k, --keypair <path-to-keypair-file>", "Path to keypair file").requiredOption("--requestor-is-authorized", "An attestation that the party making this Solana dApp publisher portal request is authorized to do so").option("-a, --app-mint-address <app-mint-address>", "The mint address of the app NFT. If not specified, the value from your config file will be used.").option("-r, --release-mint-address <release-mint-address>", "The mint address of the release NFT. If not specified, the value from your config file will be used.").option("-c, --critical", "Flag for a critical app removal request").option("-u, --url <url>", "RPC URL", Constants.DEFAULT_RPC_DEVNET).option("-d, --dry-run", "Flag for dry run. Doesn't submit the request to the publisher portal.").action(function(param) {
615
+ var appMintAddress = param.appMintAddress, releaseMintAddress = param.releaseMintAddress, keypair = param.keypair, url = param.url, requestorIsAuthorized = param.requestorIsAuthorized, critical = param.critical, dryRun = param.dryRun;
616
+ return _async_to_generator(function() {
713
617
  return _ts_generator(this, function(_state) {
714
618
  switch(_state.label){
715
619
  case 0:
716
- appMintAddress = param.appMintAddress, releaseMintAddress = param.releaseMintAddress, keypair = param.keypair, url = param.url, requestorIsAuthorized = param.requestorIsAuthorized, critical = param.critical, dryRun = param.dryRun;
717
620
  return [
718
621
  4,
719
- tryWithErrorMessage(/*#__PURE__*/ _async_to_generator(function() {
720
- var config, signer;
721
- return _ts_generator(this, function(_state) {
722
- switch(_state.label){
723
- case 0:
724
- return [
725
- 4,
726
- checkForSelfUpdate()
727
- ];
728
- case 1:
729
- _state.sent();
730
- checkSubmissionNetwork(url);
731
- return [
732
- 4,
733
- loadPublishDetails(Constants.getConfigFilePath())
734
- ];
735
- case 2:
736
- config = _state.sent();
737
- if (!hasAddressInConfig(config.release) && !releaseMintAddress) {
738
- throw new Error("Either specify a release mint address in the config file or specify as a CLI argument to this command.");
739
- }
740
- signer = parseKeypair(keypair);
741
- if (!signer) return [
742
- 3,
743
- 4
744
- ];
745
- return [
746
- 4,
747
- publishRemoveCommand({
748
- appMintAddress: appMintAddress,
749
- releaseMintAddress: releaseMintAddress,
750
- signer: signer,
751
- url: url,
752
- dryRun: dryRun,
753
- requestorIsAuthorized: requestorIsAuthorized,
754
- critical: critical
755
- })
756
- ];
757
- case 3:
758
- _state.sent();
759
- if (dryRun) {
760
- dryRunSuccessMessage();
761
- } else {
762
- showMessage("Success", "dApp successfully removed from the publisher portal");
763
- }
764
- _state.label = 4;
765
- case 4:
766
- return [
767
- 2
768
- ];
769
- }
770
- });
771
- }))
622
+ tryWithErrorMessage(function() {
623
+ return _async_to_generator(function() {
624
+ var config, signer;
625
+ return _ts_generator(this, function(_state) {
626
+ switch(_state.label){
627
+ case 0:
628
+ return [
629
+ 4,
630
+ checkForSelfUpdate()
631
+ ];
632
+ case 1:
633
+ _state.sent();
634
+ checkSubmissionNetwork(url);
635
+ return [
636
+ 4,
637
+ loadPublishDetails(Constants.getConfigFilePath())
638
+ ];
639
+ case 2:
640
+ config = _state.sent();
641
+ if (!hasAddressInConfig(config.release) && !releaseMintAddress) {
642
+ throw new Error("Either specify a release mint address in the config file or specify as a CLI argument to this command.");
643
+ }
644
+ signer = parseKeypair(keypair);
645
+ if (!signer) return [
646
+ 3,
647
+ 4
648
+ ];
649
+ return [
650
+ 4,
651
+ publishRemoveCommand({
652
+ appMintAddress: appMintAddress,
653
+ releaseMintAddress: releaseMintAddress,
654
+ signer: signer,
655
+ url: url,
656
+ dryRun: dryRun,
657
+ requestorIsAuthorized: requestorIsAuthorized,
658
+ critical: critical
659
+ })
660
+ ];
661
+ case 3:
662
+ _state.sent();
663
+ if (dryRun) {
664
+ dryRunSuccessMessage();
665
+ } else {
666
+ showMessage("Success", "dApp successfully removed from the publisher portal");
667
+ }
668
+ _state.label = 4;
669
+ case 4:
670
+ return [
671
+ 2
672
+ ];
673
+ }
674
+ });
675
+ })();
676
+ })
772
677
  ];
773
678
  case 1:
774
679
  _state.sent();
@@ -777,73 +682,71 @@ publishCommand.command("remove").description("Remove an existing app from the So
777
682
  ];
778
683
  }
779
684
  });
780
- });
781
- return function(_) {
782
- return _ref.apply(this, arguments);
783
- };
784
- }());
785
- publishCommand.command("support <request_details>").description("Submit a support request for an existing app on the Solana Mobile dApp publisher portal").requiredOption("-k, --keypair <path-to-keypair-file>", "Path to keypair file").requiredOption("--requestor-is-authorized", "An attestation that the party making this Solana dApp publisher portal request is authorized to do so").option("-a, --app-mint-address <app-mint-address>", "The mint address of the app NFT. If not specified, the value from your config file will be used.").option("-r, --release-mint-address <release-mint-address>", "The mint address of the release NFT. If not specified, the value from your config file will be used.").option("-u, --url <url>", "RPC URL", Constants.DEFAULT_RPC_DEVNET).option("-d, --dry-run", "Flag for dry run. Doesn't submit the request to the publisher portal.").action(/*#__PURE__*/ function() {
786
- var _ref = _async_to_generator(function(requestDetails, param) {
787
- var appMintAddress, releaseMintAddress, keypair, url, requestorIsAuthorized, dryRun;
685
+ })();
686
+ });
687
+ publishCommand.command("support <request_details>").description("Submit a support request for an existing app on the Solana Mobile dApp publisher portal").requiredOption("-k, --keypair <path-to-keypair-file>", "Path to keypair file").requiredOption("--requestor-is-authorized", "An attestation that the party making this Solana dApp publisher portal request is authorized to do so").option("-a, --app-mint-address <app-mint-address>", "The mint address of the app NFT. If not specified, the value from your config file will be used.").option("-r, --release-mint-address <release-mint-address>", "The mint address of the release NFT. If not specified, the value from your config file will be used.").option("-u, --url <url>", "RPC URL", Constants.DEFAULT_RPC_DEVNET).option("-d, --dry-run", "Flag for dry run. Doesn't submit the request to the publisher portal.").action(function(requestDetails, param) {
688
+ var appMintAddress = param.appMintAddress, releaseMintAddress = param.releaseMintAddress, keypair = param.keypair, url = param.url, requestorIsAuthorized = param.requestorIsAuthorized, dryRun = param.dryRun;
689
+ return _async_to_generator(function() {
788
690
  return _ts_generator(this, function(_state) {
789
691
  switch(_state.label){
790
692
  case 0:
791
- appMintAddress = param.appMintAddress, releaseMintAddress = param.releaseMintAddress, keypair = param.keypair, url = param.url, requestorIsAuthorized = param.requestorIsAuthorized, dryRun = param.dryRun;
792
693
  return [
793
694
  4,
794
- tryWithErrorMessage(/*#__PURE__*/ _async_to_generator(function() {
795
- var config, signer;
796
- return _ts_generator(this, function(_state) {
797
- switch(_state.label){
798
- case 0:
799
- return [
800
- 4,
801
- checkForSelfUpdate()
802
- ];
803
- case 1:
804
- _state.sent();
805
- checkSubmissionNetwork(url);
806
- return [
807
- 4,
808
- loadPublishDetails(Constants.getConfigFilePath())
809
- ];
810
- case 2:
811
- config = _state.sent();
812
- if (!hasAddressInConfig(config.release) && !releaseMintAddress) {
813
- throw new Error("Either specify a release mint address in the config file or specify as a CLI argument to this command.");
814
- }
815
- signer = parseKeypair(keypair);
816
- if (!signer) return [
817
- 3,
818
- 4
819
- ];
820
- return [
821
- 4,
822
- publishSupportCommand({
823
- appMintAddress: appMintAddress,
824
- releaseMintAddress: releaseMintAddress,
825
- signer: signer,
826
- url: url,
827
- dryRun: dryRun,
828
- requestorIsAuthorized: requestorIsAuthorized,
829
- requestDetails: requestDetails
830
- })
831
- ];
832
- case 3:
833
- _state.sent();
834
- if (dryRun) {
835
- dryRunSuccessMessage();
836
- } else {
837
- showMessage("Success", "Support request sent successfully");
838
- }
839
- _state.label = 4;
840
- case 4:
841
- return [
842
- 2
843
- ];
844
- }
845
- });
846
- }))
695
+ tryWithErrorMessage(function() {
696
+ return _async_to_generator(function() {
697
+ var config, signer;
698
+ return _ts_generator(this, function(_state) {
699
+ switch(_state.label){
700
+ case 0:
701
+ return [
702
+ 4,
703
+ checkForSelfUpdate()
704
+ ];
705
+ case 1:
706
+ _state.sent();
707
+ checkSubmissionNetwork(url);
708
+ return [
709
+ 4,
710
+ loadPublishDetails(Constants.getConfigFilePath())
711
+ ];
712
+ case 2:
713
+ config = _state.sent();
714
+ if (!hasAddressInConfig(config.release) && !releaseMintAddress) {
715
+ throw new Error("Either specify a release mint address in the config file or specify as a CLI argument to this command.");
716
+ }
717
+ signer = parseKeypair(keypair);
718
+ if (!signer) return [
719
+ 3,
720
+ 4
721
+ ];
722
+ return [
723
+ 4,
724
+ publishSupportCommand({
725
+ appMintAddress: appMintAddress,
726
+ releaseMintAddress: releaseMintAddress,
727
+ signer: signer,
728
+ url: url,
729
+ dryRun: dryRun,
730
+ requestorIsAuthorized: requestorIsAuthorized,
731
+ requestDetails: requestDetails
732
+ })
733
+ ];
734
+ case 3:
735
+ _state.sent();
736
+ if (dryRun) {
737
+ dryRunSuccessMessage();
738
+ } else {
739
+ showMessage("Success", "Support request sent successfully");
740
+ }
741
+ _state.label = 4;
742
+ case 4:
743
+ return [
744
+ 2
745
+ ];
746
+ }
747
+ });
748
+ })();
749
+ })
847
750
  ];
848
751
  case 1:
849
752
  _state.sent();
@@ -852,8 +755,5 @@ publishCommand.command("support <request_details>").description("Submit a suppor
852
755
  ];
853
756
  }
854
757
  });
855
- });
856
- return function(requestDetails, _) {
857
- return _ref.apply(this, arguments);
858
- };
859
- }());
758
+ })();
759
+ });