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