@solana-mobile/dapp-store-cli 0.9.4 → 0.10.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 +29 -19
- package/lib/CliUtils.js +9 -6
- package/lib/commands/ValidateCommand.js +3 -3
- package/lib/commands/create/CreateCliApp.js +4 -4
- package/lib/commands/create/CreateCliPublisher.js +4 -4
- package/lib/commands/create/CreateCliRelease.js +4 -4
- package/lib/commands/publish/PublishCliRemove.js +3 -3
- package/lib/commands/publish/PublishCliSubmit.js +16 -6
- package/lib/commands/publish/PublishCliSupport.js +3 -3
- package/lib/commands/publish/PublishCliUpdate.js +16 -6
- package/lib/commands/scaffolding/ScaffoldInit.js +1 -1
- package/lib/config/PublishDetails.js +224 -62
- package/lib/generated/config_obj.json +1 -1
- package/lib/generated/config_schema.json +1 -1
- package/lib/package.json +2 -2
- package/lib/prebuild_schema/publishing_source.yaml +10 -1
- package/lib/prebuild_schema/schemagen.js +4 -4
- package/package.json +2 -2
- package/src/CliSetup.ts +17 -0
- package/src/CliUtils.ts +10 -1
- package/src/commands/publish/PublishCliSubmit.ts +13 -4
- package/src/commands/publish/PublishCliUpdate.ts +13 -4
- package/src/config/PublishDetails.ts +70 -4
- package/src/prebuild_schema/publishing_source.yaml +10 -1
package/lib/CliSetup.js
CHANGED
|
@@ -37,13 +37,13 @@ function _ts_generator(thisArg, body) {
|
|
|
37
37
|
trys: [],
|
|
38
38
|
ops: []
|
|
39
39
|
};
|
|
40
|
-
return
|
|
40
|
+
return g = {
|
|
41
41
|
next: verb(0),
|
|
42
42
|
"throw": verb(1),
|
|
43
43
|
"return": verb(2)
|
|
44
44
|
}, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
|
|
45
45
|
return this;
|
|
46
|
-
}), g
|
|
46
|
+
}), g;
|
|
47
47
|
function verb(n) {
|
|
48
48
|
return function(v) {
|
|
49
49
|
return step([
|
|
@@ -126,7 +126,7 @@ import { Command } from "commander";
|
|
|
126
126
|
import { validateCommand } from "./commands/index.js";
|
|
127
127
|
import { createAppCommand, createPublisherCommand, createReleaseCommand } from "./commands/create/index.js";
|
|
128
128
|
import { publishRemoveCommand, publishSubmitCommand, publishSupportCommand, publishUpdateCommand } from "./commands/publish/index.js";
|
|
129
|
-
import { checkForSelfUpdate, checkSubmissionNetwork, Constants, dryRunSuccessMessage, generateNetworkSuffix, parseKeypair, showMessage, showNetworkWarningIfApplicable } from "./CliUtils.js";
|
|
129
|
+
import { checkForSelfUpdate, checkSubmissionNetwork, Constants, alphaAppSubmissionMessage, dryRunSuccessMessage, generateNetworkSuffix, parseKeypair, showMessage, showNetworkWarningIfApplicable } from "./CliUtils.js";
|
|
130
130
|
import { LAMPORTS_PER_SOL } from "@solana/web3.js";
|
|
131
131
|
import * as dotenv from "dotenv";
|
|
132
132
|
import { initScaffold } from "./commands/scaffolding/index.js";
|
|
@@ -153,11 +153,12 @@ function resolveBuildToolsPath(buildToolsPath) {
|
|
|
153
153
|
* This method should be updated with each new release of the CLI, and just do nothing when there isn't anything to report
|
|
154
154
|
*/ function latestReleaseMessage() {
|
|
155
155
|
var messages = [
|
|
156
|
+
"- App details page now supports a Banner Graphic image of size 1200x600px and a Feature Graphic image of size 1200x1200px (optional)",
|
|
156
157
|
"- App details page now supports video files. (mp4 file format only and minimum resolution 720p)",
|
|
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"'),
|
|
158
159
|
"- At least 4 screenshots are now required to update or release a new app",
|
|
159
160
|
"- App icons should be exactly 512x512."
|
|
160
|
-
].join(
|
|
161
|
+
].join('\n\n');
|
|
161
162
|
showMessage("Publishing Tools Version ".concat(Constants.CLI_VERSION), messages, "warning");
|
|
162
163
|
}
|
|
163
164
|
function tryWithErrorMessage(block) {
|
|
@@ -230,7 +231,7 @@ export var initCliCmd = mainCli.command("init").description("First-time initiali
|
|
|
230
231
|
});
|
|
231
232
|
}));
|
|
232
233
|
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
|
+
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() {
|
|
234
235
|
var _ref = _async_to_generator(function(param) {
|
|
235
236
|
var keypair, url, dryRun, storageConfig, priorityFeeLamports;
|
|
236
237
|
return _ts_generator(this, function(_state) {
|
|
@@ -298,7 +299,7 @@ export var createPublisherCliCmd = createCliCmd.command("publisher").description
|
|
|
298
299
|
return _ref.apply(this, arguments);
|
|
299
300
|
};
|
|
300
301
|
}());
|
|
301
|
-
export var createAppCliCmd = createCliCmd.command("app").description("Create a app").requiredOption("-k, --keypair <path-to-keypair-file>", "Path to keypair file").option("-p, --publisher-mint-address <publisher-mint-address>", "The mint address of the publisher NFT").option("-u, --url <url>", "RPC URL", Constants.DEFAULT_RPC_DEVNET).option("-d, --dry-run", "Flag for dry run. Doesn't mint an NFT").option("-s, --storage-config <storage-config>", "Provide alternative storage configuration details").option("-p, --priority-fee-lamports <priority-fee-lamports>", "Priority Fee lamports").action(function() {
|
|
302
|
+
export var createAppCliCmd = createCliCmd.command("app").description("Create a app").requiredOption("-k, --keypair <path-to-keypair-file>", "Path to keypair file").option("-p, --publisher-mint-address <publisher-mint-address>", "The mint address of the publisher NFT").option("-u, --url <url>", "RPC URL", Constants.DEFAULT_RPC_DEVNET).option("-d, --dry-run", "Flag for dry run. Doesn't mint an NFT").option("-s, --storage-config <storage-config>", "Provide alternative storage configuration details").option("-p, --priority-fee-lamports <priority-fee-lamports>", "Priority Fee lamports").action(/*#__PURE__*/ function() {
|
|
302
303
|
var _ref = _async_to_generator(function(param) {
|
|
303
304
|
var publisherMintAddress, keypair, url, dryRun, storageConfig, priorityFeeLamports;
|
|
304
305
|
return _ts_generator(this, function(_state) {
|
|
@@ -376,7 +377,7 @@ export var createAppCliCmd = createCliCmd.command("app").description("Create a a
|
|
|
376
377
|
return _ref.apply(this, arguments);
|
|
377
378
|
};
|
|
378
379
|
}());
|
|
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
|
+
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() {
|
|
380
381
|
var _ref = _async_to_generator(function(param) {
|
|
381
382
|
var appMintAddress, keypair, url, dryRun, buildToolsPath, storageConfig, priorityFeeLamports;
|
|
382
383
|
return _ts_generator(this, function(_state) {
|
|
@@ -459,7 +460,7 @@ export var createReleaseCliCmd = createCliCmd.command("release").description("Cr
|
|
|
459
460
|
return _ref.apply(this, arguments);
|
|
460
461
|
};
|
|
461
462
|
}());
|
|
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
|
+
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() {
|
|
463
464
|
var _ref = _async_to_generator(function(param) {
|
|
464
465
|
var keypair, buildToolsPath;
|
|
465
466
|
return _ts_generator(this, function(_state) {
|
|
@@ -520,13 +521,13 @@ mainCli.command("validate").description("Validates details prior to publishing")
|
|
|
520
521
|
};
|
|
521
522
|
}());
|
|
522
523
|
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.").action(function() {
|
|
524
|
+
publishCommand.command("submit").description("Submit a new app to the Solana Mobile dApp publisher portal").requiredOption("-k, --keypair <path-to-keypair-file>", "Path to keypair file").requiredOption("--complies-with-solana-dapp-store-policies", "An attestation that the app complies with the Solana dApp Store policies").requiredOption("--requestor-is-authorized", "An attestation that the party making this Solana dApp publisher portal request is authorized to do so").option("-a, --app-mint-address <app-mint-address>", "The mint address of the app NFT. If not specified, the value from your config file will be used.").option("-r, --release-mint-address <release-mint-address>", "The mint address of the release NFT. If not specified, the value from your config file will be used.").option("-u, --url <url>", "RPC URL", Constants.DEFAULT_RPC_DEVNET).option("-d, --dry-run", "Flag for dry run. Doesn't submit the request to the publisher portal.").option("-l, --alpha", "Flag to mark the submission as alpha test.").action(/*#__PURE__*/ function() {
|
|
524
525
|
var _ref = _async_to_generator(function(param) {
|
|
525
|
-
var appMintAddress, releaseMintAddress, keypair, url, compliesWithSolanaDappStorePolicies, requestorIsAuthorized, dryRun;
|
|
526
|
+
var appMintAddress, releaseMintAddress, keypair, url, compliesWithSolanaDappStorePolicies, requestorIsAuthorized, dryRun, alpha;
|
|
526
527
|
return _ts_generator(this, function(_state) {
|
|
527
528
|
switch(_state.label){
|
|
528
529
|
case 0:
|
|
529
|
-
appMintAddress = param.appMintAddress, releaseMintAddress = param.releaseMintAddress, keypair = param.keypair, url = param.url, compliesWithSolanaDappStorePolicies = param.compliesWithSolanaDappStorePolicies, requestorIsAuthorized = param.requestorIsAuthorized, dryRun = param.dryRun;
|
|
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;
|
|
530
531
|
return [
|
|
531
532
|
4,
|
|
532
533
|
tryWithErrorMessage(/*#__PURE__*/ _async_to_generator(function() {
|
|
@@ -550,6 +551,9 @@ publishCommand.command("submit").description("Submit a new app to the Solana Mob
|
|
|
550
551
|
if (!hasAddressInConfig(config.release) && !releaseMintAddress) {
|
|
551
552
|
throw new Error("Either specify a release mint address in the config file or specify as a CLI argument to this command.");
|
|
552
553
|
}
|
|
554
|
+
if (alpha) {
|
|
555
|
+
alphaAppSubmissionMessage();
|
|
556
|
+
}
|
|
553
557
|
signer = parseKeypair(keypair);
|
|
554
558
|
if (!signer) return [
|
|
555
559
|
3,
|
|
@@ -569,7 +573,8 @@ publishCommand.command("submit").description("Submit a new app to the Solana Mob
|
|
|
569
573
|
dryRun: dryRun,
|
|
570
574
|
compliesWithSolanaDappStorePolicies: compliesWithSolanaDappStorePolicies,
|
|
571
575
|
requestorIsAuthorized: requestorIsAuthorized,
|
|
572
|
-
critical: false
|
|
576
|
+
critical: false,
|
|
577
|
+
alphaTest: alpha
|
|
573
578
|
})
|
|
574
579
|
];
|
|
575
580
|
case 3:
|
|
@@ -588,7 +593,8 @@ publishCommand.command("submit").description("Submit a new app to the Solana Mob
|
|
|
588
593
|
url: url,
|
|
589
594
|
dryRun: dryRun,
|
|
590
595
|
compliesWithSolanaDappStorePolicies: compliesWithSolanaDappStorePolicies,
|
|
591
|
-
requestorIsAuthorized: requestorIsAuthorized
|
|
596
|
+
requestorIsAuthorized: requestorIsAuthorized,
|
|
597
|
+
alphaTest: alpha
|
|
592
598
|
})
|
|
593
599
|
];
|
|
594
600
|
case 5:
|
|
@@ -621,13 +627,13 @@ publishCommand.command("submit").description("Submit a new app to the Solana Mob
|
|
|
621
627
|
return _ref.apply(this, arguments);
|
|
622
628
|
};
|
|
623
629
|
}());
|
|
624
|
-
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.").action(function() {
|
|
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() {
|
|
625
631
|
var _ref = _async_to_generator(function(param) {
|
|
626
|
-
var appMintAddress, releaseMintAddress, keypair, url, compliesWithSolanaDappStorePolicies, requestorIsAuthorized, critical, dryRun;
|
|
632
|
+
var appMintAddress, releaseMintAddress, keypair, url, compliesWithSolanaDappStorePolicies, requestorIsAuthorized, critical, dryRun, alpha;
|
|
627
633
|
return _ts_generator(this, function(_state) {
|
|
628
634
|
switch(_state.label){
|
|
629
635
|
case 0:
|
|
630
|
-
appMintAddress = param.appMintAddress, releaseMintAddress = param.releaseMintAddress, keypair = param.keypair, url = param.url, compliesWithSolanaDappStorePolicies = param.compliesWithSolanaDappStorePolicies, requestorIsAuthorized = param.requestorIsAuthorized, critical = param.critical, dryRun = param.dryRun;
|
|
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;
|
|
631
637
|
return [
|
|
632
638
|
4,
|
|
633
639
|
tryWithErrorMessage(/*#__PURE__*/ _async_to_generator(function() {
|
|
@@ -651,6 +657,9 @@ publishCommand.command("update").description("Update an existing app on the Sola
|
|
|
651
657
|
if (!hasAddressInConfig(config.release) && !releaseMintAddress) {
|
|
652
658
|
throw new Error("Either specify a release mint address in the config file or specify as a CLI argument to this command.");
|
|
653
659
|
}
|
|
660
|
+
if (alpha) {
|
|
661
|
+
alphaAppSubmissionMessage();
|
|
662
|
+
}
|
|
654
663
|
signer = parseKeypair(keypair);
|
|
655
664
|
if (!signer) return [
|
|
656
665
|
3,
|
|
@@ -666,7 +675,8 @@ publishCommand.command("update").description("Update an existing app on the Sola
|
|
|
666
675
|
dryRun: dryRun,
|
|
667
676
|
compliesWithSolanaDappStorePolicies: compliesWithSolanaDappStorePolicies,
|
|
668
677
|
requestorIsAuthorized: requestorIsAuthorized,
|
|
669
|
-
critical: critical
|
|
678
|
+
critical: critical,
|
|
679
|
+
alphaTest: alpha
|
|
670
680
|
})
|
|
671
681
|
];
|
|
672
682
|
case 3:
|
|
@@ -697,7 +707,7 @@ publishCommand.command("update").description("Update an existing app on the Sola
|
|
|
697
707
|
return _ref.apply(this, arguments);
|
|
698
708
|
};
|
|
699
709
|
}());
|
|
700
|
-
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
|
+
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() {
|
|
701
711
|
var _ref = _async_to_generator(function(param) {
|
|
702
712
|
var appMintAddress, releaseMintAddress, keypair, url, requestorIsAuthorized, critical, dryRun;
|
|
703
713
|
return _ts_generator(this, function(_state) {
|
|
@@ -772,7 +782,7 @@ publishCommand.command("remove").description("Remove an existing app from the So
|
|
|
772
782
|
return _ref.apply(this, arguments);
|
|
773
783
|
};
|
|
774
784
|
}());
|
|
775
|
-
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
|
+
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() {
|
|
776
786
|
var _ref = _async_to_generator(function(requestDetails, param) {
|
|
777
787
|
var appMintAddress, releaseMintAddress, keypair, url, requestorIsAuthorized, dryRun;
|
|
778
788
|
return _ts_generator(this, function(_state) {
|
package/lib/CliUtils.js
CHANGED
|
@@ -55,13 +55,13 @@ function _ts_generator(thisArg, body) {
|
|
|
55
55
|
trys: [],
|
|
56
56
|
ops: []
|
|
57
57
|
};
|
|
58
|
-
return
|
|
58
|
+
return g = {
|
|
59
59
|
next: verb(0),
|
|
60
60
|
"throw": verb(1),
|
|
61
61
|
"return": verb(2)
|
|
62
62
|
}, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
|
|
63
63
|
return this;
|
|
64
|
-
}), g
|
|
64
|
+
}), g;
|
|
65
65
|
function verb(n) {
|
|
66
66
|
return function(v) {
|
|
67
67
|
return step([
|
|
@@ -145,7 +145,7 @@ import { Keypair, PublicKey } from "@solana/web3.js";
|
|
|
145
145
|
import debugModule from "debug";
|
|
146
146
|
import { IrysStorageDriver, keypairIdentity, Metaplex } from "@metaplex-foundation/js";
|
|
147
147
|
import updateNotifier from "update-notifier";
|
|
148
|
-
import { readFile } from
|
|
148
|
+
import { readFile } from 'fs/promises';
|
|
149
149
|
var cliPackage = JSON.parse((await readFile(new URL("./package.json", import.meta.url))).toString());
|
|
150
150
|
import boxen from "boxen";
|
|
151
151
|
import ver from "semver";
|
|
@@ -158,7 +158,7 @@ export var Constants = function Constants() {
|
|
|
158
158
|
"use strict";
|
|
159
159
|
_class_call_check(this, Constants);
|
|
160
160
|
};
|
|
161
|
-
_define_property(Constants, "CLI_VERSION", "0.
|
|
161
|
+
_define_property(Constants, "CLI_VERSION", "0.10.0");
|
|
162
162
|
_define_property(Constants, "CONFIG_FILE_NAME", "config.yaml");
|
|
163
163
|
_define_property(Constants, "DEFAULT_RPC_DEVNET", "https://api.devnet.solana.com");
|
|
164
164
|
_define_property(Constants, "DEFAULT_PRIORITY_FEE", 500000);
|
|
@@ -166,7 +166,7 @@ _define_property(Constants, "getConfigFilePath", function() {
|
|
|
166
166
|
return "".concat(process.cwd(), "/").concat(Constants.CONFIG_FILE_NAME);
|
|
167
167
|
});
|
|
168
168
|
export var debug = debugModule("CLI");
|
|
169
|
-
export var checkForSelfUpdate = function() {
|
|
169
|
+
export var checkForSelfUpdate = /*#__PURE__*/ function() {
|
|
170
170
|
var _ref = _async_to_generator(function() {
|
|
171
171
|
var notifier, updateInfo, latestVer, currentVer;
|
|
172
172
|
return _ts_generator(this, function(_state) {
|
|
@@ -196,7 +196,7 @@ export var checkForSelfUpdate = function() {
|
|
|
196
196
|
return _ref.apply(this, arguments);
|
|
197
197
|
};
|
|
198
198
|
}();
|
|
199
|
-
export var checkMintedStatus = function() {
|
|
199
|
+
export var checkMintedStatus = /*#__PURE__*/ function() {
|
|
200
200
|
var _ref = _async_to_generator(function(conn, pubAddr, appAddr, releaseAddr) {
|
|
201
201
|
var i, _results_, _results_1, _results_2, results, isPublisherMinted, isAppMinted, isReleaseMinted, errorMessage;
|
|
202
202
|
return _ts_generator(this, function(_state) {
|
|
@@ -299,6 +299,9 @@ export var generateNetworkSuffix = function(rpcUrl) {
|
|
|
299
299
|
export var dryRunSuccessMessage = function() {
|
|
300
300
|
showMessage("Dry run", "Dry run was successful", "standard");
|
|
301
301
|
};
|
|
302
|
+
export var alphaAppSubmissionMessage = function() {
|
|
303
|
+
showMessage("Alpha release", "Alpha releases are not reviewed on dApp store and are meant for internal testing only.\n" + "Run the `npx dapp-store publish submit ...` command again without the `--alpha` param to publish the app", "warning");
|
|
304
|
+
};
|
|
302
305
|
export var showNetworkWarningIfApplicable = function(rpcUrl) {
|
|
303
306
|
if (isDevnet(rpcUrl)) {
|
|
304
307
|
showMessage("Devnet Mode", "Running on Devnet", "warning");
|
|
@@ -37,13 +37,13 @@ function _ts_generator(thisArg, body) {
|
|
|
37
37
|
trys: [],
|
|
38
38
|
ops: []
|
|
39
39
|
};
|
|
40
|
-
return
|
|
40
|
+
return g = {
|
|
41
41
|
next: verb(0),
|
|
42
42
|
"throw": verb(1),
|
|
43
43
|
"return": verb(2)
|
|
44
44
|
}, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
|
|
45
45
|
return this;
|
|
46
|
-
}), g
|
|
46
|
+
}), g;
|
|
47
47
|
function verb(n) {
|
|
48
48
|
return function(v) {
|
|
49
49
|
return step([
|
|
@@ -125,7 +125,7 @@ function _ts_generator(thisArg, body) {
|
|
|
125
125
|
import { createAppJson, createPublisherJson, createReleaseJson, validateApp, validatePublisher, validateRelease, metaplexFileReplacer } from "@solana-mobile/dapp-store-publishing-tools";
|
|
126
126
|
import { debug, showMessage } from "../CliUtils.js";
|
|
127
127
|
import { loadPublishDetailsWithChecks } from "../config/PublishDetails.js";
|
|
128
|
-
export var validateCommand = function() {
|
|
128
|
+
export var validateCommand = /*#__PURE__*/ function() {
|
|
129
129
|
var _ref = _async_to_generator(function(param) {
|
|
130
130
|
var signer, buildToolsPath, _ref, publisherDetails, appDetails, releaseDetails, publisherJson, _publisherJson_image, _e_message, errorMsg, appJson, _appJson_image, _e_message1, errorMsg1, releaseJson, objStringified, _e_message2, errorMsg2;
|
|
131
131
|
return _ts_generator(this, function(_state) {
|
|
@@ -37,13 +37,13 @@ function _ts_generator(thisArg, body) {
|
|
|
37
37
|
trys: [],
|
|
38
38
|
ops: []
|
|
39
39
|
};
|
|
40
|
-
return
|
|
40
|
+
return g = {
|
|
41
41
|
next: verb(0),
|
|
42
42
|
"throw": verb(1),
|
|
43
43
|
"return": verb(2)
|
|
44
44
|
}, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
|
|
45
45
|
return this;
|
|
46
|
-
}), g
|
|
46
|
+
}), g;
|
|
47
47
|
function verb(n) {
|
|
48
48
|
return function(v) {
|
|
49
49
|
return step([
|
|
@@ -127,7 +127,7 @@ import { Connection, Keypair, PublicKey } from "@solana/web3.js";
|
|
|
127
127
|
import { Constants, getMetaplexInstance } from "../../CliUtils.js";
|
|
128
128
|
import { loadPublishDetailsWithChecks, writeToPublishDetails } from "../../config/PublishDetails.js";
|
|
129
129
|
import { sendAndConfirmTransaction } from "../utils.js";
|
|
130
|
-
var createAppNft = function() {
|
|
130
|
+
var createAppNft = /*#__PURE__*/ function() {
|
|
131
131
|
var _ref = _async_to_generator(function(param) {
|
|
132
132
|
var appDetails, connection, publisherMintAddress, publisher, storageParams, priorityFeeLamports, mintAddress, metaplex, txBuilder, response;
|
|
133
133
|
return _ts_generator(this, function(_state) {
|
|
@@ -172,7 +172,7 @@ var createAppNft = function() {
|
|
|
172
172
|
return _ref.apply(this, arguments);
|
|
173
173
|
};
|
|
174
174
|
}();
|
|
175
|
-
export var createAppCommand = function() {
|
|
175
|
+
export var createAppCommand = /*#__PURE__*/ function() {
|
|
176
176
|
var _ref = _async_to_generator(function(param) {
|
|
177
177
|
var signer, url, dryRun, publisherMintAddress, storageParams, _param_priorityFeeLamports, priorityFeeLamports, connection, _ref, appDetails, publisherDetails, _publisherDetails_address, _ref1, appAddress, transactionSignature;
|
|
178
178
|
return _ts_generator(this, function(_state) {
|
|
@@ -37,13 +37,13 @@ function _ts_generator(thisArg, body) {
|
|
|
37
37
|
trys: [],
|
|
38
38
|
ops: []
|
|
39
39
|
};
|
|
40
|
-
return
|
|
40
|
+
return g = {
|
|
41
41
|
next: verb(0),
|
|
42
42
|
"throw": verb(1),
|
|
43
43
|
"return": verb(2)
|
|
44
44
|
}, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
|
|
45
45
|
return this;
|
|
46
|
-
}), g
|
|
46
|
+
}), g;
|
|
47
47
|
function verb(n) {
|
|
48
48
|
return function(v) {
|
|
49
49
|
return step([
|
|
@@ -127,7 +127,7 @@ import { Connection, Keypair } from "@solana/web3.js";
|
|
|
127
127
|
import { Constants, getMetaplexInstance } from "../../CliUtils.js";
|
|
128
128
|
import { loadPublishDetailsWithChecks, writeToPublishDetails } from "../../config/PublishDetails.js";
|
|
129
129
|
import { sendAndConfirmTransaction } from "../utils.js";
|
|
130
|
-
var createPublisherNft = function() {
|
|
130
|
+
var createPublisherNft = /*#__PURE__*/ function() {
|
|
131
131
|
var _ref = _async_to_generator(function(param) {
|
|
132
132
|
var connection, publisher, publisherDetails, storageParams, priorityFeeLamports, mintAddress, metaplex, txBuilder, response;
|
|
133
133
|
return _ts_generator(this, function(_state) {
|
|
@@ -171,7 +171,7 @@ var createPublisherNft = function() {
|
|
|
171
171
|
return _ref.apply(this, arguments);
|
|
172
172
|
};
|
|
173
173
|
}();
|
|
174
|
-
export var createPublisherCommand = function() {
|
|
174
|
+
export var createPublisherCommand = /*#__PURE__*/ function() {
|
|
175
175
|
var _ref = _async_to_generator(function(param) {
|
|
176
176
|
var signer, url, dryRun, storageParams, _param_priorityFeeLamports, priorityFeeLamports, connection, _ref, publisherDetails, _ref1, publisherAddress, transactionSignature;
|
|
177
177
|
return _ts_generator(this, function(_state) {
|
|
@@ -65,13 +65,13 @@ function _ts_generator(thisArg, body) {
|
|
|
65
65
|
trys: [],
|
|
66
66
|
ops: []
|
|
67
67
|
};
|
|
68
|
-
return
|
|
68
|
+
return g = {
|
|
69
69
|
next: verb(0),
|
|
70
70
|
"throw": verb(1),
|
|
71
71
|
"return": verb(2)
|
|
72
72
|
}, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
|
|
73
73
|
return this;
|
|
74
|
-
}), g
|
|
74
|
+
}), g;
|
|
75
75
|
function verb(n) {
|
|
76
76
|
return function(v) {
|
|
77
77
|
return step([
|
|
@@ -157,7 +157,7 @@ import { createHash } from "crypto";
|
|
|
157
157
|
import { Constants, getMetaplexInstance } from "../../CliUtils.js";
|
|
158
158
|
import { loadPublishDetailsWithChecks, writeToPublishDetails } from "../../config/PublishDetails.js";
|
|
159
159
|
import { sendAndConfirmTransaction } from "../utils.js";
|
|
160
|
-
var createReleaseNft = function() {
|
|
160
|
+
var createReleaseNft = /*#__PURE__*/ function() {
|
|
161
161
|
var _ref = _async_to_generator(function(param) {
|
|
162
162
|
var appMintAddress, releaseDetails, appDetails, publisherDetails, connection, publisher, storageParams, priorityFeeLamports, releaseMintAddress, metaplex, txBuilder, response;
|
|
163
163
|
return _ts_generator(this, function(_state) {
|
|
@@ -204,7 +204,7 @@ var createReleaseNft = function() {
|
|
|
204
204
|
return _ref.apply(this, arguments);
|
|
205
205
|
};
|
|
206
206
|
}();
|
|
207
|
-
export var createReleaseCommand = function() {
|
|
207
|
+
export var createReleaseCommand = /*#__PURE__*/ function() {
|
|
208
208
|
var _ref = _async_to_generator(function(param) {
|
|
209
209
|
var appMintAddress, buildToolsPath, signer, url, _param_dryRun, dryRun, storageParams, _param_priorityFeeLamports, priorityFeeLamports, connection, config, apkEntry, mediaBuffer, hash, _config_app_address, _ref, releaseAddress, transactionSignature;
|
|
210
210
|
return _ts_generator(this, function(_state) {
|
|
@@ -37,13 +37,13 @@ function _ts_generator(thisArg, body) {
|
|
|
37
37
|
trys: [],
|
|
38
38
|
ops: []
|
|
39
39
|
};
|
|
40
|
-
return
|
|
40
|
+
return g = {
|
|
41
41
|
next: verb(0),
|
|
42
42
|
"throw": verb(1),
|
|
43
43
|
"return": verb(2)
|
|
44
44
|
}, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
|
|
45
45
|
return this;
|
|
46
|
-
}), g
|
|
46
|
+
}), g;
|
|
47
47
|
function verb(n) {
|
|
48
48
|
return function(v) {
|
|
49
49
|
return step([
|
|
@@ -127,7 +127,7 @@ import { publishRemove } from "@solana-mobile/dapp-store-publishing-tools";
|
|
|
127
127
|
import { checkMintedStatus } from "../../CliUtils.js";
|
|
128
128
|
import nacl from "tweetnacl";
|
|
129
129
|
import { loadPublishDetailsWithChecks } from "../../config/PublishDetails.js";
|
|
130
|
-
export var publishRemoveCommand = function() {
|
|
130
|
+
export var publishRemoveCommand = /*#__PURE__*/ function() {
|
|
131
131
|
var _ref = _async_to_generator(function(param) {
|
|
132
132
|
var appMintAddress, releaseMintAddress, signer, url, _param_dryRun, dryRun, _param_requestorIsAuthorized, requestorIsAuthorized, _param_critical, critical, connection, _ref, publisherDetails, appDetails, releaseDetails, sign, pubAddr, appAddr, releaseAddr;
|
|
133
133
|
return _ts_generator(this, function(_state) {
|
|
@@ -37,13 +37,13 @@ function _ts_generator(thisArg, body) {
|
|
|
37
37
|
trys: [],
|
|
38
38
|
ops: []
|
|
39
39
|
};
|
|
40
|
-
return
|
|
40
|
+
return g = {
|
|
41
41
|
next: verb(0),
|
|
42
42
|
"throw": verb(1),
|
|
43
43
|
"return": verb(2)
|
|
44
44
|
}, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
|
|
45
45
|
return this;
|
|
46
|
-
}), g
|
|
46
|
+
}), g;
|
|
47
47
|
function verb(n) {
|
|
48
48
|
return function(v) {
|
|
49
49
|
return step([
|
|
@@ -127,13 +127,13 @@ import { publishSubmit } from "@solana-mobile/dapp-store-publishing-tools";
|
|
|
127
127
|
import nacl from "tweetnacl";
|
|
128
128
|
import { checkMintedStatus, showMessage } from "../../CliUtils.js";
|
|
129
129
|
import { loadPublishDetailsWithChecks, writeToPublishDetails } from "../../config/PublishDetails.js";
|
|
130
|
-
export var publishSubmitCommand = function() {
|
|
130
|
+
export var publishSubmitCommand = /*#__PURE__*/ function() {
|
|
131
131
|
var _ref = _async_to_generator(function(param) {
|
|
132
|
-
var appMintAddress, releaseMintAddress, signer, url, _param_dryRun, dryRun, _param_compliesWithSolanaDappStorePolicies, compliesWithSolanaDappStorePolicies, _param_requestorIsAuthorized, requestorIsAuthorized, connection, _ref, publisherDetails, appDetails, releaseDetails, solanaMobileDappPublisherPortalDetails, lastUpdatedVersionOnStore, sign, pubAddr, appAddr, releaseAddr;
|
|
132
|
+
var appMintAddress, releaseMintAddress, signer, url, _param_dryRun, dryRun, _param_compliesWithSolanaDappStorePolicies, compliesWithSolanaDappStorePolicies, _param_requestorIsAuthorized, requestorIsAuthorized, alphaTest, connection, _ref, publisherDetails, appDetails, releaseDetails, solanaMobileDappPublisherPortalDetails, lastUpdatedVersionOnStore, sign, pubAddr, appAddr, releaseAddr;
|
|
133
133
|
return _ts_generator(this, function(_state) {
|
|
134
134
|
switch(_state.label){
|
|
135
135
|
case 0:
|
|
136
|
-
appMintAddress = param.appMintAddress, releaseMintAddress = param.releaseMintAddress, signer = param.signer, url = param.url, _param_dryRun = param.dryRun, dryRun = _param_dryRun === void 0 ? false : _param_dryRun, _param_compliesWithSolanaDappStorePolicies = param.compliesWithSolanaDappStorePolicies, compliesWithSolanaDappStorePolicies = _param_compliesWithSolanaDappStorePolicies === void 0 ? false : _param_compliesWithSolanaDappStorePolicies, _param_requestorIsAuthorized = param.requestorIsAuthorized, requestorIsAuthorized = _param_requestorIsAuthorized === void 0 ? false : _param_requestorIsAuthorized;
|
|
136
|
+
appMintAddress = param.appMintAddress, releaseMintAddress = param.releaseMintAddress, signer = param.signer, url = param.url, _param_dryRun = param.dryRun, dryRun = _param_dryRun === void 0 ? false : _param_dryRun, _param_compliesWithSolanaDappStorePolicies = param.compliesWithSolanaDappStorePolicies, compliesWithSolanaDappStorePolicies = _param_compliesWithSolanaDappStorePolicies === void 0 ? false : _param_compliesWithSolanaDappStorePolicies, _param_requestorIsAuthorized = param.requestorIsAuthorized, requestorIsAuthorized = _param_requestorIsAuthorized === void 0 ? false : _param_requestorIsAuthorized, alphaTest = param.alphaTest;
|
|
137
137
|
showMessage("Publishing Estimates", "New app submissions take around 3-4 business days for review.", "warning");
|
|
138
138
|
if (!compliesWithSolanaDappStorePolicies) {
|
|
139
139
|
console.error("ERROR: Cannot submit a request for which the requestor does not attest that it complies with Solana dApp Store policies");
|
|
@@ -153,6 +153,9 @@ export var publishSubmitCommand = function() {
|
|
|
153
153
|
];
|
|
154
154
|
case 1:
|
|
155
155
|
_ref = _state.sent(), publisherDetails = _ref.publisher, appDetails = _ref.app, releaseDetails = _ref.release, solanaMobileDappPublisherPortalDetails = _ref.solana_mobile_dapp_publisher_portal, lastUpdatedVersionOnStore = _ref.lastUpdatedVersionOnStore;
|
|
156
|
+
if (alphaTest && solanaMobileDappPublisherPortalDetails.alpha_testers == undefined) {
|
|
157
|
+
throw new Error("Alpha test submission without specifying any testers.\nAdd field alpha_testers in your 'config.yaml' file.");
|
|
158
|
+
}
|
|
156
159
|
sign = function(buf) {
|
|
157
160
|
return nacl.sign(buf, signer.secretKey);
|
|
158
161
|
};
|
|
@@ -179,11 +182,16 @@ export var publishSubmitCommand = function() {
|
|
|
179
182
|
publisherDetails: publisherDetails,
|
|
180
183
|
solanaMobileDappPublisherPortalDetails: solanaMobileDappPublisherPortalDetails,
|
|
181
184
|
compliesWithSolanaDappStorePolicies: compliesWithSolanaDappStorePolicies,
|
|
182
|
-
requestorIsAuthorized: requestorIsAuthorized
|
|
185
|
+
requestorIsAuthorized: requestorIsAuthorized,
|
|
186
|
+
alphaTest: alphaTest
|
|
183
187
|
}, dryRun)
|
|
184
188
|
];
|
|
185
189
|
case 3:
|
|
186
190
|
_state.sent();
|
|
191
|
+
if (!!alphaTest) return [
|
|
192
|
+
3,
|
|
193
|
+
5
|
|
194
|
+
];
|
|
187
195
|
return [
|
|
188
196
|
4,
|
|
189
197
|
writeToPublishDetails({
|
|
@@ -194,6 +202,8 @@ export var publishSubmitCommand = function() {
|
|
|
194
202
|
];
|
|
195
203
|
case 4:
|
|
196
204
|
_state.sent();
|
|
205
|
+
_state.label = 5;
|
|
206
|
+
case 5:
|
|
197
207
|
return [
|
|
198
208
|
2
|
|
199
209
|
];
|
|
@@ -37,13 +37,13 @@ function _ts_generator(thisArg, body) {
|
|
|
37
37
|
trys: [],
|
|
38
38
|
ops: []
|
|
39
39
|
};
|
|
40
|
-
return
|
|
40
|
+
return g = {
|
|
41
41
|
next: verb(0),
|
|
42
42
|
"throw": verb(1),
|
|
43
43
|
"return": verb(2)
|
|
44
44
|
}, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
|
|
45
45
|
return this;
|
|
46
|
-
}), g
|
|
46
|
+
}), g;
|
|
47
47
|
function verb(n) {
|
|
48
48
|
return function(v) {
|
|
49
49
|
return step([
|
|
@@ -127,7 +127,7 @@ import { publishSupport } from "@solana-mobile/dapp-store-publishing-tools";
|
|
|
127
127
|
import { checkMintedStatus } from "../../CliUtils.js";
|
|
128
128
|
import nacl from "tweetnacl";
|
|
129
129
|
import { loadPublishDetailsWithChecks } from "../../config/PublishDetails.js";
|
|
130
|
-
export var publishSupportCommand = function() {
|
|
130
|
+
export var publishSupportCommand = /*#__PURE__*/ function() {
|
|
131
131
|
var _ref = _async_to_generator(function(param) {
|
|
132
132
|
var appMintAddress, releaseMintAddress, signer, url, _param_dryRun, dryRun, _param_requestorIsAuthorized, requestorIsAuthorized, requestDetails, connection, _ref, publisherDetails, appDetails, releaseDetails, sign, pubAddr, appAddr, releaseAddr;
|
|
133
133
|
return _ts_generator(this, function(_state) {
|
|
@@ -37,13 +37,13 @@ function _ts_generator(thisArg, body) {
|
|
|
37
37
|
trys: [],
|
|
38
38
|
ops: []
|
|
39
39
|
};
|
|
40
|
-
return
|
|
40
|
+
return g = {
|
|
41
41
|
next: verb(0),
|
|
42
42
|
"throw": verb(1),
|
|
43
43
|
"return": verb(2)
|
|
44
44
|
}, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
|
|
45
45
|
return this;
|
|
46
|
-
}), g
|
|
46
|
+
}), g;
|
|
47
47
|
function verb(n) {
|
|
48
48
|
return function(v) {
|
|
49
49
|
return step([
|
|
@@ -127,13 +127,13 @@ import { publishUpdate } from "@solana-mobile/dapp-store-publishing-tools";
|
|
|
127
127
|
import { checkMintedStatus, showMessage } from "../../CliUtils.js";
|
|
128
128
|
import nacl from "tweetnacl";
|
|
129
129
|
import { loadPublishDetailsWithChecks, writeToPublishDetails } from "../../config/PublishDetails.js";
|
|
130
|
-
export var publishUpdateCommand = function() {
|
|
130
|
+
export var publishUpdateCommand = /*#__PURE__*/ function() {
|
|
131
131
|
var _ref = _async_to_generator(function(param) {
|
|
132
|
-
var appMintAddress, releaseMintAddress, signer, url, _param_dryRun, dryRun, _param_compliesWithSolanaDappStorePolicies, compliesWithSolanaDappStorePolicies, _param_requestorIsAuthorized, requestorIsAuthorized, _param_critical, critical, connection, _ref, publisherDetails, appDetails, releaseDetails, solanaMobileDappPublisherPortalDetails, lastUpdatedVersionOnStore, sign, pubAddr, appAddr, releaseAddr;
|
|
132
|
+
var appMintAddress, releaseMintAddress, signer, url, _param_dryRun, dryRun, _param_compliesWithSolanaDappStorePolicies, compliesWithSolanaDappStorePolicies, _param_requestorIsAuthorized, requestorIsAuthorized, _param_critical, critical, alphaTest, connection, _ref, publisherDetails, appDetails, releaseDetails, solanaMobileDappPublisherPortalDetails, lastUpdatedVersionOnStore, sign, pubAddr, appAddr, releaseAddr;
|
|
133
133
|
return _ts_generator(this, function(_state) {
|
|
134
134
|
switch(_state.label){
|
|
135
135
|
case 0:
|
|
136
|
-
appMintAddress = param.appMintAddress, releaseMintAddress = param.releaseMintAddress, signer = param.signer, url = param.url, _param_dryRun = param.dryRun, dryRun = _param_dryRun === void 0 ? false : _param_dryRun, _param_compliesWithSolanaDappStorePolicies = param.compliesWithSolanaDappStorePolicies, compliesWithSolanaDappStorePolicies = _param_compliesWithSolanaDappStorePolicies === void 0 ? false : _param_compliesWithSolanaDappStorePolicies, _param_requestorIsAuthorized = param.requestorIsAuthorized, requestorIsAuthorized = _param_requestorIsAuthorized === void 0 ? false : _param_requestorIsAuthorized, _param_critical = param.critical, critical = _param_critical === void 0 ? false : _param_critical;
|
|
136
|
+
appMintAddress = param.appMintAddress, releaseMintAddress = param.releaseMintAddress, signer = param.signer, url = param.url, _param_dryRun = param.dryRun, dryRun = _param_dryRun === void 0 ? false : _param_dryRun, _param_compliesWithSolanaDappStorePolicies = param.compliesWithSolanaDappStorePolicies, compliesWithSolanaDappStorePolicies = _param_compliesWithSolanaDappStorePolicies === void 0 ? false : _param_compliesWithSolanaDappStorePolicies, _param_requestorIsAuthorized = param.requestorIsAuthorized, requestorIsAuthorized = _param_requestorIsAuthorized === void 0 ? false : _param_requestorIsAuthorized, _param_critical = param.critical, critical = _param_critical === void 0 ? false : _param_critical, alphaTest = param.alphaTest;
|
|
137
137
|
showMessage("Publishing Estimates", "App update approvals take around 1-2 business days for review.", "warning");
|
|
138
138
|
if (!compliesWithSolanaDappStorePolicies) {
|
|
139
139
|
console.error("ERROR: Cannot submit a request for which the requestor does not attest that it complies with Solana dApp Store policies");
|
|
@@ -155,6 +155,9 @@ export var publishUpdateCommand = function() {
|
|
|
155
155
|
];
|
|
156
156
|
case 1:
|
|
157
157
|
_ref = _state.sent(), publisherDetails = _ref.publisher, appDetails = _ref.app, releaseDetails = _ref.release, solanaMobileDappPublisherPortalDetails = _ref.solana_mobile_dapp_publisher_portal, lastUpdatedVersionOnStore = _ref.lastUpdatedVersionOnStore;
|
|
158
|
+
if (alphaTest && solanaMobileDappPublisherPortalDetails.alpha_testers == undefined) {
|
|
159
|
+
throw new Error("Alpha test submission without specifying any testers.\nAdd field alpha_testers in your 'config.yaml' file.");
|
|
160
|
+
}
|
|
158
161
|
sign = function(buf) {
|
|
159
162
|
return nacl.sign(buf, signer.secretKey);
|
|
160
163
|
};
|
|
@@ -182,11 +185,16 @@ export var publishUpdateCommand = function() {
|
|
|
182
185
|
solanaMobileDappPublisherPortalDetails: solanaMobileDappPublisherPortalDetails,
|
|
183
186
|
compliesWithSolanaDappStorePolicies: compliesWithSolanaDappStorePolicies,
|
|
184
187
|
requestorIsAuthorized: requestorIsAuthorized,
|
|
185
|
-
criticalUpdate: critical
|
|
188
|
+
criticalUpdate: critical,
|
|
189
|
+
alphaTest: alphaTest
|
|
186
190
|
}, dryRun)
|
|
187
191
|
];
|
|
188
192
|
case 3:
|
|
189
193
|
_state.sent();
|
|
194
|
+
if (!!alphaTest) return [
|
|
195
|
+
3,
|
|
196
|
+
5
|
|
197
|
+
];
|
|
190
198
|
return [
|
|
191
199
|
4,
|
|
192
200
|
writeToPublishDetails({
|
|
@@ -197,6 +205,8 @@ export var publishUpdateCommand = function() {
|
|
|
197
205
|
];
|
|
198
206
|
case 4:
|
|
199
207
|
_state.sent();
|
|
208
|
+
_state.label = 5;
|
|
209
|
+
case 5:
|
|
200
210
|
return [
|
|
201
211
|
2
|
|
202
212
|
];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { dump } from "js-yaml";
|
|
2
|
-
import { readFile } from
|
|
2
|
+
import { readFile } from 'fs/promises';
|
|
3
3
|
var releaseSchema = JSON.parse((await readFile(new URL("../../generated/config_obj.json", import.meta.url))).toString());
|
|
4
4
|
import fs from "fs";
|
|
5
5
|
import { Constants } from "../../CliUtils.js";
|