@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.
- package/lib/CliSetup.js +470 -569
- package/lib/CliUtils.js +19 -34
- package/lib/__tests__/CliSetupTest.js +4 -27
- package/lib/commands/ValidateCommand.js +16 -41
- package/lib/commands/create/CreateCliApp.js +19 -31
- package/lib/commands/create/CreateCliRelease.js +17 -27
- package/lib/commands/create/index.js +0 -1
- package/lib/commands/publish/PublishCliRemove.js +12 -20
- package/lib/commands/publish/PublishCliSubmit.js +12 -20
- package/lib/commands/publish/PublishCliSupport.js +12 -20
- package/lib/commands/publish/PublishCliUpdate.js +12 -20
- package/lib/commands/scaffolding/ScaffoldInit.js +1 -1
- package/lib/commands/utils.js +6 -14
- package/lib/config/PublishDetails.js +219 -220
- package/lib/generated/config_obj.json +1 -1
- package/lib/generated/config_schema.json +1 -1
- package/lib/index.js +6 -14
- package/lib/package.json +2 -2
- package/lib/prebuild_schema/publishing_source.yaml +4 -4
- package/lib/prebuild_schema/schemagen.js +4 -4
- package/lib/upload/CachedStorageDriver.js +13 -19
- package/package.json +2 -2
- package/src/CliSetup.ts +5 -53
- package/src/CliUtils.ts +5 -11
- package/src/__tests__/CliSetupTest.ts +8 -43
- package/src/commands/ValidateCommand.ts +0 -20
- package/src/commands/create/CreateCliApp.ts +1 -8
- package/src/commands/create/index.ts +0 -1
- package/src/commands/publish/PublishCliRemove.ts +1 -2
- package/src/commands/publish/PublishCliSubmit.ts +1 -2
- package/src/commands/publish/PublishCliSupport.ts +1 -2
- package/src/commands/publish/PublishCliUpdate.ts +1 -2
- package/src/config/PublishDetails.ts +58 -61
- package/src/prebuild_schema/publishing_source.yaml +4 -4
- package/lib/commands/create/CreateCliPublisher.js +0 -237
- 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,
|
|
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,
|
|
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
|
-
"-
|
|
157
|
-
"-
|
|
158
|
-
|
|
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
|
|
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(
|
|
208
|
-
return
|
|
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(
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
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
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
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(
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
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
|
-
|
|
376
|
-
|
|
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(
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
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
|
-
|
|
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
|
-
|
|
459
|
-
|
|
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(
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
525
|
-
|
|
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(
|
|
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
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
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
|
-
|
|
626
|
-
|
|
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(
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
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
|
-
|
|
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
|
-
|
|
706
|
-
|
|
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(
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
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
|
-
|
|
781
|
-
|
|
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(
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
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
|
-
|
|
856
|
-
return _ref.apply(this, arguments);
|
|
857
|
-
};
|
|
858
|
-
}());
|
|
758
|
+
})();
|
|
759
|
+
});
|