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