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