@solana-mobile/dapp-store-cli 0.1.9 → 0.3.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/README.md +18 -53
- package/lib/esm/commands/create/app.js +2 -2
- package/lib/esm/commands/create/app.js.map +1 -1
- package/lib/esm/commands/create/publisher.js +2 -2
- package/lib/esm/commands/create/publisher.js.map +1 -1
- package/lib/esm/commands/create/release.js +2 -2
- package/lib/esm/commands/create/release.js.map +1 -1
- package/lib/esm/commands/publish/remove.js +6 -2
- package/lib/esm/commands/publish/remove.js.map +1 -1
- package/lib/esm/commands/publish/submit.js +8 -4
- package/lib/esm/commands/publish/submit.js.map +1 -1
- package/lib/esm/commands/publish/support.js +6 -2
- package/lib/esm/commands/publish/support.js.map +1 -1
- package/lib/esm/commands/publish/update.js +6 -2
- package/lib/esm/commands/publish/update.js.map +1 -1
- package/lib/esm/commands/scaffolding/index.js +2 -0
- package/lib/esm/commands/scaffolding/index.js.map +1 -0
- package/lib/esm/commands/scaffolding/init.js +15 -0
- package/lib/esm/commands/scaffolding/init.js.map +1 -0
- package/lib/esm/commands/validate.js +6 -15
- package/lib/esm/commands/validate.js.map +1 -1
- package/lib/esm/config/index.js +1 -2
- package/lib/esm/config/index.js.map +1 -1
- package/lib/esm/generated/config_obj.json +1 -0
- package/lib/esm/generated/config_schema.json +1 -0
- package/lib/esm/index.js +38 -17
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/package.json +6 -3
- package/lib/esm/utils.js +63 -23
- package/lib/esm/utils.js.map +1 -1
- package/lib/types/commands/create/app.d.ts +1 -1
- package/lib/types/commands/create/app.d.ts.map +1 -1
- package/lib/types/commands/create/release.d.ts +1 -1
- package/lib/types/commands/create/release.d.ts.map +1 -1
- package/lib/types/commands/publish/remove.d.ts +1 -1
- package/lib/types/commands/publish/remove.d.ts.map +1 -1
- package/lib/types/commands/publish/submit.d.ts +1 -1
- package/lib/types/commands/publish/submit.d.ts.map +1 -1
- package/lib/types/commands/publish/support.d.ts +1 -1
- package/lib/types/commands/publish/support.d.ts.map +1 -1
- package/lib/types/commands/publish/update.d.ts +1 -1
- package/lib/types/commands/publish/update.d.ts.map +1 -1
- package/lib/types/commands/scaffolding/index.d.ts +2 -0
- package/lib/types/commands/scaffolding/index.d.ts.map +1 -0
- package/lib/types/commands/scaffolding/init.d.ts +2 -0
- package/lib/types/commands/scaffolding/init.d.ts.map +1 -0
- package/lib/types/commands/validate.d.ts.map +1 -1
- package/lib/types/config/index.d.ts.map +1 -1
- package/lib/types/upload/CachedStorageDriver.d.ts +3 -3
- package/lib/types/upload/CachedStorageDriver.d.ts.map +1 -1
- package/lib/types/utils.d.ts +8 -3
- package/lib/types/utils.d.ts.map +1 -1
- package/package.json +6 -3
- package/src/commands/create/app.ts +2 -2
- package/src/commands/create/publisher.ts +2 -2
- package/src/commands/create/release.ts +2 -2
- package/src/commands/publish/remove.ts +9 -2
- package/src/commands/publish/submit.ts +13 -5
- package/src/commands/publish/support.ts +9 -2
- package/src/commands/publish/update.ts +9 -2
- package/src/commands/scaffolding/index.ts +1 -0
- package/src/commands/scaffolding/init.ts +19 -0
- package/src/commands/validate.ts +7 -14
- package/src/config/index.ts +1 -2
- package/src/generated/config_obj.json +1 -0
- package/src/generated/config_schema.json +1 -0
- package/src/index.ts +54 -19
- package/src/prebuild_schema/publishing_source.yaml +46 -0
- package/src/prebuild_schema/schemagen.js +27 -0
- package/src/utils.ts +80 -28
- package/lib/esm/config/schema.json +0 -195
- package/src/config/schema.json +0 -195
package/README.md
CHANGED
|
@@ -25,24 +25,36 @@ echo "ANDROID_TOOLS_DIR=\"<path_to_android_sdk_build_tools_dir>\"" > .env
|
|
|
25
25
|
In your application folder (e.g., `example`):
|
|
26
26
|
|
|
27
27
|
```shell
|
|
28
|
-
|
|
28
|
+
mkdir publishing
|
|
29
|
+
cd publishing
|
|
30
|
+
|
|
31
|
+
pnpm init
|
|
29
32
|
pnpm install --save-dev @solana-mobile/dapp-store-cli
|
|
33
|
+
npx dapp-store init
|
|
30
34
|
npx dapp-store --help
|
|
31
35
|
```
|
|
32
36
|
|
|
33
37
|
or with `yarn`
|
|
34
38
|
|
|
35
39
|
```shell
|
|
36
|
-
|
|
40
|
+
mkdir publishing
|
|
41
|
+
cd publishing
|
|
42
|
+
|
|
43
|
+
yarn init
|
|
37
44
|
yarn add @solana-mobile/dapp-store-cli
|
|
45
|
+
yarn run dapp-store init
|
|
38
46
|
yarn run dapp-store --help
|
|
39
47
|
```
|
|
40
48
|
|
|
41
49
|
or with `npm`
|
|
42
50
|
|
|
43
51
|
```shell
|
|
44
|
-
|
|
52
|
+
mkdir publishing
|
|
53
|
+
cd publishing
|
|
54
|
+
|
|
55
|
+
npm init
|
|
45
56
|
npm install --save-dev @solana-mobile/dapp-store-cli
|
|
57
|
+
npx dapp-store init
|
|
46
58
|
npx dapp-store --help
|
|
47
59
|
```
|
|
48
60
|
|
|
@@ -69,53 +81,6 @@ Repeat steps 3. and 4. as needed!
|
|
|
69
81
|
|
|
70
82
|
The `dapp-store` CLI handles rote tasks like uploading assets to immutable file storage and i18n. However, it is by no means the only way to create these NFTs—all information about the requirements are specified in this repository, and the packages have been designed to be portable to other client contexts besides the CLI.
|
|
71
83
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
```yaml
|
|
77
|
-
publisher:
|
|
78
|
-
name: My new publisher name
|
|
79
|
-
address: BrWNieTsfdkkwMaz2A616i1fkqSjxk2kHhTn1Y44pi48
|
|
80
|
-
website: https://solanamobile.com
|
|
81
|
-
email: hello@solanamobile.com
|
|
82
|
-
media:
|
|
83
|
-
- purpose: icon
|
|
84
|
-
uri: ./media/publisher_icon.jpeg
|
|
85
|
-
app:
|
|
86
|
-
name: My new app name
|
|
87
|
-
address: 4xE4MDVHfFAXMKKzqrJ2v1HxcgYgdoV98nuvd8SRKhWP
|
|
88
|
-
android_package: com.company.dapp
|
|
89
|
-
urls:
|
|
90
|
-
license_url: http://cdn.org/license.html
|
|
91
|
-
copyright_url: http://cdn.org/copyright.html
|
|
92
|
-
privacy_policy_url: http://cdn.org/privacy.html
|
|
93
|
-
website: http://cdn.org
|
|
94
|
-
media:
|
|
95
|
-
- purpose: icon
|
|
96
|
-
uri: ./media/app_icon.jpeg
|
|
97
|
-
release:
|
|
98
|
-
address: HeXP8pLxxzWPo1j7FwsytrCBN9Q7HZ3MA8TVCVGj5eCA
|
|
99
|
-
media:
|
|
100
|
-
- purpose: screenshot
|
|
101
|
-
uri: ./media/app_screenshot.png
|
|
102
|
-
files:
|
|
103
|
-
- purpose: install
|
|
104
|
-
uri: ./files/app-debug.apk
|
|
105
|
-
catalog:
|
|
106
|
-
en-US:
|
|
107
|
-
name: |
|
|
108
|
-
A nice, helpful dApp name
|
|
109
|
-
long_description: |
|
|
110
|
-
Some wonderful release notes, in long-form
|
|
111
|
-
new_in_version: |
|
|
112
|
-
Something new in this version
|
|
113
|
-
saga_features: |
|
|
114
|
-
Some information about saga specific features
|
|
115
|
-
solana_mobile_dapp_publisher_portal:
|
|
116
|
-
google_store_package: com.company.dapp.otherpkg
|
|
117
|
-
testing_instructions: >
|
|
118
|
-
Here are some steps informing Solana Mobile of how to test this dapp. You
|
|
119
|
-
can specify multiple lines of instructions. For example, if a login is
|
|
120
|
-
needed, you would add those details here.
|
|
121
|
-
```
|
|
84
|
+
### CLI Updates
|
|
85
|
+
|
|
86
|
+
The CLI will automatically check for updated versions on npm and restrict operations if the version bump is significant enough. If your CI/CD deployments fail be sure to check if there is a required update.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createApp } from "@solana-mobile/dapp-store-publishing-tools";
|
|
2
2
|
import { Connection, Keypair, PublicKey, sendAndConfirmTransaction, } from "@solana/web3.js";
|
|
3
|
-
import {
|
|
3
|
+
import { getConfigWithChecks, getMetaplexInstance, saveToConfig, } from "../../utils.js";
|
|
4
4
|
const createAppNft = async ({ appDetails, connection, publisherMintAddress, publisher, }, { dryRun }) => {
|
|
5
5
|
const mintAddress = Keypair.generate();
|
|
6
6
|
const metaplex = getMetaplexInstance(connection, publisher);
|
|
@@ -23,7 +23,7 @@ const createAppNft = async ({ appDetails, connection, publisherMintAddress, publ
|
|
|
23
23
|
};
|
|
24
24
|
export const createAppCommand = async ({ signer, url, dryRun, publisherMintAddress, }) => {
|
|
25
25
|
const connection = new Connection(url);
|
|
26
|
-
const { app: appDetails, publisher: publisherDetails } = await
|
|
26
|
+
const { app: appDetails, publisher: publisherDetails } = await getConfigWithChecks();
|
|
27
27
|
const { appAddress } = await createAppNft({
|
|
28
28
|
connection,
|
|
29
29
|
publisher: signer,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.js","sourceRoot":"","sources":["../../../../src/commands/create/app.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,4CAA4C,CAAC;AACvE,OAAO,EACL,UAAU,EACV,OAAO,EACP,SAAS,EACT,yBAAyB,GAC1B,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACL,
|
|
1
|
+
{"version":3,"file":"app.js","sourceRoot":"","sources":["../../../../src/commands/create/app.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,4CAA4C,CAAC;AACvE,OAAO,EACL,UAAU,EACV,OAAO,EACP,SAAS,EACT,yBAAyB,GAC1B,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,YAAY,GACb,MAAM,gBAAgB,CAAC;AAExB,MAAM,YAAY,GAAG,KAAK,EACxB,EACE,UAAU,EACV,UAAU,EACV,oBAAoB,EACpB,SAAS,GAMV,EACD,EAAE,MAAM,EAAwB,EAChC,EAAE;IACF,MAAM,WAAW,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC;IACvC,MAAM,QAAQ,GAAG,mBAAmB,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC;IAC5D,MAAM,SAAS,GAAG,MAAM,SAAS,CAC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E,UAAU,EAAE,EAAE,CAAC,CAAC;KAChD;IAED,OAAO,EAAE,UAAU,EAAE,CAAC;AACxB,CAAC,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createPublisher } from "@solana-mobile/dapp-store-publishing-tools";
|
|
2
2
|
import { Connection, Keypair, sendAndConfirmTransaction, } from "@solana/web3.js";
|
|
3
|
-
import {
|
|
3
|
+
import { getConfigWithChecks, getMetaplexInstance, saveToConfig, } from "../../utils.js";
|
|
4
4
|
const createPublisherNft = async ({ connection, publisher, publisherDetails, }, { dryRun }) => {
|
|
5
5
|
const mintAddress = Keypair.generate();
|
|
6
6
|
const metaplex = getMetaplexInstance(connection, publisher);
|
|
@@ -20,7 +20,7 @@ const createPublisherNft = async ({ connection, publisher, publisherDetails, },
|
|
|
20
20
|
};
|
|
21
21
|
export const createPublisherCommand = async ({ signer, url, dryRun, }) => {
|
|
22
22
|
const connection = new Connection(url);
|
|
23
|
-
const { publisher: publisherDetails } = await
|
|
23
|
+
const { publisher: publisherDetails } = await getConfigWithChecks();
|
|
24
24
|
const { publisherAddress } = await createPublisherNft({
|
|
25
25
|
connection,
|
|
26
26
|
publisher: signer,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"publisher.js","sourceRoot":"","sources":["../../../../src/commands/create/publisher.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,4CAA4C,CAAC;AAC7E,OAAO,EACL,UAAU,EACV,OAAO,EACP,yBAAyB,GAC1B,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACL,
|
|
1
|
+
{"version":3,"file":"publisher.js","sourceRoot":"","sources":["../../../../src/commands/create/publisher.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,4CAA4C,CAAC;AAC7E,OAAO,EACL,UAAU,EACV,OAAO,EACP,yBAAyB,GAC1B,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACL,mBAAmB,EACnB,mBAAmB,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S,EAAE,gBAAgB,EAAE,GAAG,MAAM,mBAAmB,EAAE,CAAC;IAEpE,MAAM,EAAE,gBAAgB,EAAE,GAAG,MAAM,kBAAkB,CACnD;QACE,UAAU;QACV,SAAS,EAAE,MAAM;QACjB,gBAAgB;KACjB,EACD,EAAE,MAAM,EAAE,CACX,CAAC;IAEF,kDAAkD;IAClD,YAAY,CAAC,EAAE,SAAS,EAAE,EAAE,OAAO,EAAE,gBAAgB,EAAE,EAAE,CAAC,CAAC;IAE3D,OAAO,EAAE,gBAAgB,EAAE,CAAC;AAC9B,CAAC,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createRelease } from "@solana-mobile/dapp-store-publishing-tools";
|
|
2
2
|
import { Connection, Keypair, PublicKey, sendAndConfirmTransaction, } from "@solana/web3.js";
|
|
3
|
-
import {
|
|
3
|
+
import { getConfigWithChecks, getMetaplexInstance, saveToConfig, } from "../../utils.js";
|
|
4
4
|
const createReleaseNft = async ({ appMintAddress, releaseDetails, appDetails, publisherDetails, connection, publisher, }) => {
|
|
5
5
|
const releaseMintAddress = Keypair.generate();
|
|
6
6
|
const metaplex = getMetaplexInstance(connection, publisher);
|
|
@@ -26,7 +26,7 @@ const createReleaseNft = async ({ appMintAddress, releaseDetails, appDetails, pu
|
|
|
26
26
|
};
|
|
27
27
|
export const createReleaseCommand = async ({ appMintAddress, buildToolsPath, signer, url, dryRun = false, }) => {
|
|
28
28
|
const connection = new Connection(url);
|
|
29
|
-
const { release, app, publisher } = await
|
|
29
|
+
const { release, app, publisher } = await getConfigWithChecks(buildToolsPath);
|
|
30
30
|
if (!dryRun) {
|
|
31
31
|
const { releaseAddress } = await createReleaseNft({
|
|
32
32
|
appMintAddress: app.address ?? appMintAddress,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"release.js","sourceRoot":"","sources":["../../../../src/commands/create/release.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,aAAa,EAAE,MAAM,4CAA4C,CAAC;AAC3E,OAAO,EACL,UAAU,EACV,OAAO,EACP,SAAS,EACT,yBAAyB,GAC1B,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EACL,
|
|
1
|
+
{"version":3,"file":"release.js","sourceRoot":"","sources":["../../../../src/commands/create/release.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,aAAa,EAAE,MAAM,4CAA4C,CAAC;AAC3E,OAAO,EACL,UAAU,EACV,OAAO,EACP,SAAS,EACT,yBAAyB,GAC1B,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,YAAY,GACb,MAAM,gBAAgB,CAAC;AAUxB,MAAM,gBAAgB,GAAG,KAAK,EAAE,EAC9B,cAAc,EACd,cAAc,EACd,UAAU,EACV,gBAAgB,EAChB,UAAU,EACV,SAAS,GAQV,EAAE,EAAE;IACH,MAAM,kBAAkB,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC;IAE9C,MAAM,QAAQ,GAAG,mBAAmB,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC;IAE5D,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,aAAa,CACvC;QACE,cAAc,EAAE,IAAI,SAAS,CAAC,cAAc,CAAC;QAC7C,kBAAkB;QAClB,cAAc;QACd,UAAU;QACV,gBAAgB;KACjB,EACD,EAAE,QAAQ,EAAE,SAAS,EAAE,CACxB,CAAC;IAEF,MAAM,SAAS,GAAG,MAAM,UAAU,CAAC,kBAAkB,EAAE,CAAC;IACxD,MAAM,EAAE,GAAG,SAAS,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC;IAC9C,EAAE,CAAC,IAAI,CAAC,kBAAkB,EAAE,SAAS,CAAC,CAAC;IAEvC,MAAM,KAAK,GAAG,MAAM,yBAAyB,CAAC,UAAU,EAAE,EAAE,EAAE;QAC5D,SAAS;QACT,kBAAkB;KACnB,CAAC,CAAC;IACH,OAAO,CAAC,IAAI,CAAC;QACX,KAAK;QACL,kBAAkB,EAAE,kBAAkB,CAAC,SAAS,CAAC,QAAQ,EAAE;KAC5D,CAAC,CAAC;IAEH,OAAO,EAAE,cAAc,EAAE,kBAAkB,CAAC,SAAS,CAAC,QAAQ,EAAE,EAAE,CAAC;AACrE,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAG,KAAK,EAAE,EACzC,cAAc,EACd,cAAc,EACd,MAAM,EACN,GAAG,EACH,MAAM,GAAG,KAAK,GACY,EAAE,EAAE;IAC9B,MAAM,UAAU,GAAG,IAAI,UAAU,CAAC,GAAG,CAAC,CAAC;IAEvC,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,MAAM,mBAAmB,CAAC,cAAc,CAAC,CAAC;IAE9E,IAAI,CAAC,MAAM,EAAE;QACX,MAAM,EAAE,cAAc,EAAE,GAAG,MAAM,gBAAgB,CAAC;YAChD,cAAc,EAAE,GAAG,CAAC,OAAO,IAAI,cAAc;YAC7C,UAAU;YACV,SAAS,EAAE,MAAM;YACjB,cAAc,EAAE;gBACd,GAAG,OAAO;aACX;YACD,UAAU,EAAE,GAAG;YACf,gBAAgB,EAAE,SAAS;SAC5B,CAAC,CAAC;QAEH,YAAY,CAAC;YACX,OAAO,EAAE,EAAE,OAAO,EAAE,cAAc,EAAE;SACrC,CAAC,CAAC;QAEH,OAAO,EAAE,cAAc,EAAE,CAAC;KAC3B;AACH,CAAC,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Connection } from "@solana/web3.js";
|
|
2
2
|
import { publishRemove } from "@solana-mobile/dapp-store-publishing-tools";
|
|
3
|
-
import {
|
|
3
|
+
import { checkMintedStatus, getConfigWithChecks } from "../../utils.js";
|
|
4
4
|
import nacl from "tweetnacl";
|
|
5
5
|
export const publishRemoveCommand = async ({ appMintAddress, releaseMintAddress, signer, url, dryRun = false, requestorIsAuthorized = false, critical = false, }) => {
|
|
6
6
|
if (!requestorIsAuthorized) {
|
|
@@ -8,8 +8,12 @@ export const publishRemoveCommand = async ({ appMintAddress, releaseMintAddress,
|
|
|
8
8
|
return;
|
|
9
9
|
}
|
|
10
10
|
const connection = new Connection(url);
|
|
11
|
-
const { publisher: publisherDetails, app: appDetails, release: releaseDetails, } = await
|
|
11
|
+
const { publisher: publisherDetails, app: appDetails, release: releaseDetails, } = await getConfigWithChecks();
|
|
12
12
|
const sign = ((buf) => nacl.sign(buf, signer.secretKey));
|
|
13
|
+
const pubAddr = publisherDetails.address;
|
|
14
|
+
const appAddr = appMintAddress ?? appDetails.address;
|
|
15
|
+
const releaseAddr = releaseMintAddress ?? releaseDetails.address;
|
|
16
|
+
await checkMintedStatus(connection, pubAddr, appAddr, releaseAddr);
|
|
13
17
|
await publishRemove({ connection, sign }, {
|
|
14
18
|
appMintAddress: appMintAddress ?? appDetails.address,
|
|
15
19
|
releaseMintAddress: releaseMintAddress ?? releaseDetails.address,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remove.js","sourceRoot":"","sources":["../../../../src/commands/publish/remove.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAW,MAAM,iBAAiB,CAAC;AAEtD,OAAO,EAAE,aAAa,EAAE,MAAM,4CAA4C,CAAC;AAC3E,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"remove.js","sourceRoot":"","sources":["../../../../src/commands/publish/remove.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAW,MAAM,iBAAiB,CAAC;AAEtD,OAAO,EAAE,aAAa,EAAE,MAAM,4CAA4C,CAAC;AAC3E,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AACxE,OAAO,IAAI,MAAM,WAAW,CAAC;AAY7B,MAAM,CAAC,MAAM,oBAAoB,GAAG,KAAK,EAAE,EACzC,cAAc,EACd,kBAAkB,EAClB,MAAM,EACN,GAAG,EACH,MAAM,GAAG,KAAK,EACd,qBAAqB,GAAG,KAAK,EAC7B,QAAQ,GAAG,KAAK,GACU,EAAE,EAAE;IAC9B,IAAI,CAAC,qBAAqB,EAAE;QAC1B,OAAO,CAAC,KAAK,CACX,qGAAqG,CACtG,CAAC;QACF,OAAO;KACR;IAED,MAAM,UAAU,GAAG,IAAI,UAAU,CAAC,GAAG,CAAC,CAAC;IACvC,MAAM,EACJ,SAAS,EAAE,gBAAgB,EAC3B,GAAG,EAAE,UAAU,EACf,OAAO,EAAE,cAAc,GACxB,GAAG,MAAM,mBAAmB,EAAE,CAAC;IAEhC,MAAM,IAAI,GAAG,CAAC,CAAC,GAAW,EAAE,EAAE,CAC5B,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,MAAM,CAAC,SAAS,CAAC,CAA6B,CAAC;IAEhE,MAAM,OAAO,GAAG,gBAAgB,CAAC,OAAO,CAAC;IACzC,MAAM,OAAO,GAAG,cAAc,IAAI,UAAU,CAAC,OAAO,CAAC;IACrD,MAAM,WAAW,GAAG,kBAAkB,IAAI,cAAc,CAAC,OAAO,CAAC;IAEjE,MAAM,iBAAiB,CAAC,UAAU,EAAE,OAAO,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC;IAEnE,MAAM,aAAa,CACjB,EAAE,UAAU,EAAE,IAAI,EAAE,EACpB;QACE,cAAc,EAAE,cAAc,IAAI,UAAU,CAAC,OAAO;QACpD,kBAAkB,EAAE,kBAAkB,IAAI,cAAc,CAAC,OAAO;QAChE,gBAAgB;QAChB,qBAAqB;QACrB,cAAc,EAAE,QAAQ;KACzB,EACD,MAAM,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Connection } from "@solana/web3.js";
|
|
2
2
|
import { publishSubmit } from "@solana-mobile/dapp-store-publishing-tools";
|
|
3
3
|
import nacl from "tweetnacl";
|
|
4
|
-
import {
|
|
4
|
+
import { checkMintedStatus, getConfigWithChecks } from "../../utils.js";
|
|
5
5
|
export const publishSubmitCommand = async ({ appMintAddress, releaseMintAddress, signer, url, dryRun = false, compliesWithSolanaDappStorePolicies = false, requestorIsAuthorized = false, }) => {
|
|
6
6
|
if (!compliesWithSolanaDappStorePolicies) {
|
|
7
7
|
console.error("ERROR: Cannot submit a request for which the requestor does not attest that it complies with Solana dApp Store policies");
|
|
@@ -12,11 +12,15 @@ export const publishSubmitCommand = async ({ appMintAddress, releaseMintAddress,
|
|
|
12
12
|
return;
|
|
13
13
|
}
|
|
14
14
|
const connection = new Connection(url);
|
|
15
|
-
const { publisher: publisherDetails, app: appDetails, release: releaseDetails, solana_mobile_dapp_publisher_portal: solanaMobileDappPublisherPortalDetails, } = await
|
|
15
|
+
const { publisher: publisherDetails, app: appDetails, release: releaseDetails, solana_mobile_dapp_publisher_portal: solanaMobileDappPublisherPortalDetails, } = await getConfigWithChecks();
|
|
16
16
|
const sign = ((buf) => nacl.sign(buf, signer.secretKey));
|
|
17
|
+
const pubAddr = publisherDetails.address;
|
|
18
|
+
const appAddr = appMintAddress ?? appDetails.address;
|
|
19
|
+
const releaseAddr = releaseMintAddress ?? releaseDetails.address;
|
|
20
|
+
await checkMintedStatus(connection, pubAddr, appAddr, releaseAddr);
|
|
17
21
|
await publishSubmit({ connection, sign }, {
|
|
18
|
-
appMintAddress:
|
|
19
|
-
releaseMintAddress:
|
|
22
|
+
appMintAddress: appAddr,
|
|
23
|
+
releaseMintAddress: releaseAddr,
|
|
20
24
|
publisherDetails,
|
|
21
25
|
solanaMobileDappPublisherPortalDetails,
|
|
22
26
|
compliesWithSolanaDappStorePolicies,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"submit.js","sourceRoot":"","sources":["../../../../src/commands/publish/submit.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"submit.js","sourceRoot":"","sources":["../../../../src/commands/publish/submit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,UAAU,EAAsB,MAAM,iBAAiB,CAAC;AAE9E,OAAO,EAAE,aAAa,EAAE,MAAM,4CAA4C,CAAC;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B,sCAAsC;QACtC,mCAAmC;QACnC,qBAAqB;KACtB,EACD,MAAM,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Connection } from "@solana/web3.js";
|
|
2
2
|
import { publishSupport } from "@solana-mobile/dapp-store-publishing-tools";
|
|
3
|
-
import {
|
|
3
|
+
import { checkMintedStatus, getConfigWithChecks } from "../../utils.js";
|
|
4
4
|
import nacl from "tweetnacl";
|
|
5
5
|
export const publishSupportCommand = async ({ appMintAddress, releaseMintAddress, signer, url, dryRun = false, requestorIsAuthorized = false, requestDetails, }) => {
|
|
6
6
|
if (!requestorIsAuthorized) {
|
|
@@ -8,8 +8,12 @@ export const publishSupportCommand = async ({ appMintAddress, releaseMintAddress
|
|
|
8
8
|
return;
|
|
9
9
|
}
|
|
10
10
|
const connection = new Connection(url);
|
|
11
|
-
const { publisher: publisherDetails, app: appDetails, release: releaseDetails, } = await
|
|
11
|
+
const { publisher: publisherDetails, app: appDetails, release: releaseDetails, } = await getConfigWithChecks();
|
|
12
12
|
const sign = ((buf) => nacl.sign(buf, signer.secretKey));
|
|
13
|
+
const pubAddr = publisherDetails.address;
|
|
14
|
+
const appAddr = appMintAddress ?? appDetails.address;
|
|
15
|
+
const releaseAddr = releaseMintAddress ?? releaseDetails.address;
|
|
16
|
+
await checkMintedStatus(connection, pubAddr, appAddr, releaseAddr);
|
|
13
17
|
await publishSupport({ connection, sign }, {
|
|
14
18
|
appMintAddress: appMintAddress ?? appDetails.address,
|
|
15
19
|
releaseMintAddress: releaseMintAddress ?? releaseDetails.address,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"support.js","sourceRoot":"","sources":["../../../../src/commands/publish/support.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAW,MAAM,iBAAiB,CAAC;AAEtD,OAAO,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAC;AAC5E,OAAO,EAAE,
|
|
1
|
+
{"version":3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QACpD,kBAAkB,EAAE,kBAAkB,IAAI,cAAc,CAAC,OAAO;QAChE,gBAAgB;QAChB,qBAAqB;QACrB,cAAc;KACf,EACD,MAAM,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Connection } from "@solana/web3.js";
|
|
2
2
|
import { publishUpdate } from "@solana-mobile/dapp-store-publishing-tools";
|
|
3
|
-
import {
|
|
3
|
+
import { checkMintedStatus, getConfigWithChecks } from "../../utils.js";
|
|
4
4
|
import nacl from "tweetnacl";
|
|
5
5
|
export const publishUpdateCommand = async ({ appMintAddress, releaseMintAddress, signer, url, dryRun = false, compliesWithSolanaDappStorePolicies = false, requestorIsAuthorized = false, critical = false, }) => {
|
|
6
6
|
if (!compliesWithSolanaDappStorePolicies) {
|
|
@@ -12,8 +12,12 @@ export const publishUpdateCommand = async ({ appMintAddress, releaseMintAddress,
|
|
|
12
12
|
return;
|
|
13
13
|
}
|
|
14
14
|
const connection = new Connection(url);
|
|
15
|
-
const { publisher: publisherDetails, app: appDetails, release: releaseDetails, solana_mobile_dapp_publisher_portal: solanaMobileDappPublisherPortalDetails, } = await
|
|
15
|
+
const { publisher: publisherDetails, app: appDetails, release: releaseDetails, solana_mobile_dapp_publisher_portal: solanaMobileDappPublisherPortalDetails, } = await getConfigWithChecks();
|
|
16
16
|
const sign = ((buf) => nacl.sign(buf, signer.secretKey));
|
|
17
|
+
const pubAddr = publisherDetails.address;
|
|
18
|
+
const appAddr = appMintAddress ?? appDetails.address;
|
|
19
|
+
const releaseAddr = releaseMintAddress ?? releaseDetails.address;
|
|
20
|
+
await checkMintedStatus(connection, pubAddr, appAddr, releaseAddr);
|
|
17
21
|
await publishUpdate({ connection, sign }, {
|
|
18
22
|
appMintAddress: appMintAddress ?? appDetails.address,
|
|
19
23
|
releaseMintAddress: releaseMintAddress ?? releaseDetails.address,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update.js","sourceRoot":"","sources":["../../../../src/commands/publish/update.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAW,MAAM,iBAAiB,CAAC;AAEtD,OAAO,EAAE,aAAa,EAAE,MAAM,4CAA4C,CAAC;AAC3E,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"update.js","sourceRoot":"","sources":["../../../../src/commands/publish/update.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAW,MAAM,iBAAiB,CAAC;AAEtD,OAAO,EAAE,aAAa,EAAE,MAAM,4CAA4C,CAAC;AAC3E,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AACxE,OAAO,IAAI,MAAM,WAAW,CAAC;AAa7B,MAAM,CAAC,MAAM,oBAAoB,GAAG,KAAK,EAAE,EACzC,cAAc,EACd,kBAAkB,EAClB,MAAM,EACN,GAAG,EACH,MAAM,GAAG,KAAK,EACd,mCAAmC,GAAG,KAAK,EAC3C,qBAAqB,GAAG,KAAK,EAC7B,QAAQ,GAAG,KAAK,GACU,EAAE,EAAE;IAC9B,IAAI,CAAC,mCAAmC,EAAE;QACxC,OAAO,CAAC,KAAK,CACX,yHAAyH,CAC1H,CAAC;QACF,OAAO;KACR;SAAM,IAAI,CAAC,qBAAqB,EAAE;QACjC,OAAO,CAAC,KAAK,CACX,qGAAqG,CACtG,CAAC;QACF,OAAO;KACR;IAED,MAAM,UAAU,GAAG,IAAI,UAAU,CAAC,GAAG,CAAC,CAAC;IACvC,MAAM,EACJ,SAAS,EAAE,gBAAgB,EAC3B,GAAG,EAAE,UAAU,EACf,OAAO,EAAE,cAAc,EACvB,mCAAmC,EAAE,sCAAsC,GAC5E,GAAG,MAAM,mBAAmB,EAAE,CAAC;IAEhC,MAAM,IAAI,GAAG,CAAC,CAAC,GAAW,EAAE,EAAE,CAC5B,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,MAAM,CAAC,SAAS,CAAC,CAA6B,CAAC;IAEhE,MAAM,OAAO,GAAG,gBAAgB,CAAC,OAAO,CAAC;IACzC,MAAM,OAAO,GAAG,cAAc,IAAI,UAAU,CAAC,OAAO,CAAC;IACrD,MAAM,WAAW,GAAG,kBAAkB,IAAI,cAAc,CAAC,OAAO,CAAC;IAEjE,MAAM,iBAAiB,CAAC,UAAU,EAAE,OAAO,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC;IAEnE,MAAM,aAAa,CACjB,EAAE,UAAU,EAAE,IAAI,EAAE,EACpB;QACE,cAAc,EAAE,cAAc,IAAI,UAAU,CAAC,OAAO;QACpD,kBAAkB,EAAE,kBAAkB,IAAI,cAAc,CAAC,OAAO;QAChE,gBAAgB;QAChB,sCAAsC;QACtC,mCAAmC;QACnC,qBAAqB;QACrB,cAAc,EAAE,QAAQ;KACzB,EACD,MAAM,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/commands/scaffolding/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { dump } from "js-yaml";
|
|
2
|
+
// eslint-disable-next-line require-extensions/require-extensions
|
|
3
|
+
import releaseSchema from "../../generated/config_obj.json" assert { type: "json" };
|
|
4
|
+
import fs from "fs";
|
|
5
|
+
import { Constants } from "../../utils.js";
|
|
6
|
+
export const initScaffold = () => {
|
|
7
|
+
const outputYaml = Constants.CONFIG_FILE_NAME;
|
|
8
|
+
const outFile = `${process.cwd()}/${outputYaml}`;
|
|
9
|
+
if (fs.existsSync(outFile)) {
|
|
10
|
+
throw Error("Configuration file already present; please use to intialize a new config file.");
|
|
11
|
+
}
|
|
12
|
+
fs.writeFileSync(outFile, dump(releaseSchema));
|
|
13
|
+
return `Your configuration file was created: ${outputYaml}`;
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=init.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../../../src/commands/scaffolding/init.ts"],"names":[],"mappings":"AAAA,OAAa,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAErC,iEAAiE;AACjE,OAAO,aAAa,MAAM,iCAAiC,CAAC,SAAS,IAAI,EAAE,MAAM,EAAE,CAAC;AACpF,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C,MAAM,CAAC,MAAM,YAAY,GAAG,GAAW,EAAE;IACvC,MAAM,UAAU,GAAG,SAAS,CAAC,gBAAgB,CAAC;IAC9C,MAAM,OAAO,GAAG,GAAG,OAAO,CAAC,GAAG,EAAE,IAAI,UAAU,EAAE,CAAC;IAEjD,IAAI,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE;QAC1B,MAAM,KAAK,CAAC,gFAAgF,CAAC,CAAC;KAC/F;IAED,EAAE,CAAC,aAAa,CAAC,OAAO,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC;IAE/C,OAAO,wCAAwC,UAAU,EAAE,CAAC;AAC9D,CAAC,CAAC"}
|
|
@@ -1,17 +1,7 @@
|
|
|
1
|
-
import { createAppJson, createPublisherJson, createReleaseJson, validateApp, validatePublisher, validateRelease, } from "@solana-mobile/dapp-store-publishing-tools";
|
|
2
|
-
import { debug,
|
|
3
|
-
import { isMetaplexFile } from "@metaplex-foundation/js";
|
|
4
|
-
const metaplexFileReplacer = (k, v) => {
|
|
5
|
-
if (isMetaplexFile(v)) {
|
|
6
|
-
return {
|
|
7
|
-
...v,
|
|
8
|
-
buffer: "(suppressed)",
|
|
9
|
-
};
|
|
10
|
-
}
|
|
11
|
-
return v;
|
|
12
|
-
};
|
|
1
|
+
import { createAppJson, createPublisherJson, createReleaseJson, validateApp, validatePublisher, validateRelease, metaplexFileReplacer, } from "@solana-mobile/dapp-store-publishing-tools";
|
|
2
|
+
import { debug, getConfigWithChecks } from "../utils.js";
|
|
13
3
|
export const validateCommand = async ({ signer, buildToolsPath, }) => {
|
|
14
|
-
const { publisher: publisherDetails, app: appDetails, release: releaseDetails, } = await
|
|
4
|
+
const { publisher: publisherDetails, app: appDetails, release: releaseDetails, } = await getConfigWithChecks(buildToolsPath);
|
|
15
5
|
debug({ publisherDetails, appDetails, releaseDetails });
|
|
16
6
|
const publisherJson = createPublisherJson(publisherDetails);
|
|
17
7
|
if (typeof publisherJson.image !== "string") {
|
|
@@ -38,9 +28,10 @@ export const validateCommand = async ({ signer, buildToolsPath, }) => {
|
|
|
38
28
|
console.error(e);
|
|
39
29
|
}
|
|
40
30
|
const releaseJson = await createReleaseJson({ releaseDetails, appDetails, publisherDetails }, signer.publicKey);
|
|
41
|
-
|
|
31
|
+
const objStringified = JSON.stringify(releaseJson, metaplexFileReplacer, 2);
|
|
32
|
+
debug("releaseJson=", objStringified);
|
|
42
33
|
try {
|
|
43
|
-
validateRelease(
|
|
34
|
+
validateRelease(JSON.parse(objStringified));
|
|
44
35
|
console.info(`Release JSON valid!`);
|
|
45
36
|
}
|
|
46
37
|
catch (e) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate.js","sourceRoot":"","sources":["../../../src/commands/validate.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,mBAAmB,EACnB,iBAAiB,EACjB,WAAW,EACX,iBAAiB,EACjB,eAAe,
|
|
1
|
+
{"version":3,"file":"validate.js","sourceRoot":"","sources":["../../../src/commands/validate.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,mBAAmB,EACnB,iBAAiB,EACjB,WAAW,EACX,iBAAiB,EACjB,eAAe,EACf,oBAAoB,GACrB,MAAM,4CAA4C,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAMzD,MAAM,CAAC,MAAM,eAAe,GAAG,KAAK,EAAE,EACpC,MAAM,EACN,cAAc,GAIf,EAAE,EAAE;IAC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AAM,iBAAiB,CACzC,EAAE,cAAc,EAAE,UAAU,EAAE,gBAAgB,EAAE,EAChD,MAAM,CAAC,SAAS,CACjB,CAAC;IAEF,MAAM,cAAc,GAAG,IAAI,CAAC,SAAS,CAAC,WAAW,EAAE,oBAAoB,EAAE,CAAC,CAAC,CAAC;IAC5E,KAAK,CAAC,cAAc,EAAE,cAAc,CAAC,CAAC;IAEtC,IAAI;QACF,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC;QAC5C,OAAO,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC;KACrC;IAAC,OAAO,CAAC,EAAE;QACV,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;KAClB;AACH,CAAC,CAAC"}
|
package/lib/esm/config/index.js
CHANGED
|
@@ -2,12 +2,11 @@ import fs from "fs/promises";
|
|
|
2
2
|
import { load } from "js-yaml";
|
|
3
3
|
import Ajv from "ajv";
|
|
4
4
|
// eslint-disable-next-line require-extensions/require-extensions
|
|
5
|
-
import schemaJson from "
|
|
5
|
+
import schemaJson from "../generated/config_schema.json" assert { type: "json" };
|
|
6
6
|
const ajv = new Ajv({ strictTuples: false });
|
|
7
7
|
const validate = ajv.compile(schemaJson);
|
|
8
8
|
export const getConfig = async (configPath) => {
|
|
9
9
|
const configFile = await fs.readFile(configPath, "utf-8");
|
|
10
|
-
const configJson = load(configFile);
|
|
11
10
|
const valid = validate(load(configFile));
|
|
12
11
|
if (!valid) {
|
|
13
12
|
console.error(validate.errors);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/config/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,MAAM,aAAa,CAAC;AAC7B,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAE/B,OAAO,GAAG,MAAM,KAAK,CAAC;AAEtB,iEAAiE;AACjE,OAAO,UAAU,MAAM,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/config/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,MAAM,aAAa,CAAC;AAC7B,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAE/B,OAAO,GAAG,MAAM,KAAK,CAAC;AAEtB,iEAAiE;AACjE,OAAO,UAAU,MAAM,iCAAiC,CAAC,SAAS,IAAI,EAAE,MAAM,EAAE,CAAC;AAUjF,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,EAAE,YAAY,EAAE,KAAK,EAAE,CAAC,CAAC;AAC7C,MAAM,QAAQ,GAAG,GAAG,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;AAEzC,MAAM,CAAC,MAAM,SAAS,GAAG,KAAK,EAAE,UAAkB,EAAE,EAAE;IACpD,MAAM,UAAU,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IAE1D,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,UAAU,CAAW,CAAC,CAAC;IAEnD,IAAI,CAAC,KAAK,EAAE;QACV,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;QAC/B,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;KACjB;IAED,MAAM,MAAM,GAAG,IAAI,CAAC,UAAU,CAAc,CAAC;IAC7C,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{ "publisher": { "name": "<<YOUR_PUBLISHER_NAME>>", "address": "", "website": "<<URL_OF_PUBLISHER_WEBSITE>>", "email": "<<EMAIL_ADDRESS_TO_CONTACT_PUBLISHER>>", "media": [{ "purpose": "icon", "uri": "<<RELATIVE_PATH_TO_PUBLISHER_ICON>>" }] }, "app": { "name": "<<APP_NAME>>", "address": "", "android_package": "<<ANDROID_PACKAGE_NAME>>", "urls": { "license_url": "<<URL_OF_APP_LICENSE_OR_TERMS_OF_SERVICE>>", "copyright_url": "<<URL_OF_COPYRIGHT_DETAILS_FOR_APP>>", "privacy_policy_url": "<<URL_OF_APP_PRIVACY_POLICY>>", "website": "<<URL_OF_APP_WEBSITE>>" }, "media": [{ "purpose": "icon", "uri": "<<RELATIVE_PATH_TO_APP_ICON>>" }] }, "release": { "address": "", "media": [{ "purpose": "icon", "uri": "<<RELATIVE_PATH_TO_RELEASE_ICON>>" }, { "purpose": "screenshot", "uri": "<<RELATIVE_PATH_TO_SCREENSHOT>>" }], "files": [{ "purpose": "install", "uri": "<<RELATIVE_PATH_TO_APK>>" }], "catalog": { "en-US": { "name": "<<APP_NAME>>\n", "short_description": "<<SHORT_APP_DESCRIPTION>>\n", "long_description": "<<LONG_APP_DESCRIPTION>>\n", "new_in_version": "<<WHATS_NEW_IN_THIS_VERSION>>\n", "saga_features": "<<ANY_FEATURES_ONLY_AVAILBLE_WHEN_RUNNING_ON_SAGA>>\n" } } }, "solana_mobile_dapp_publisher_portal": { "google_store_package": "<<ANDROID_PACKAGE_NAME_OF_GOOGLE_PLAY_STORE_VERSION_IF_DIFFERENT>>", "testing_instructions": "<<TESTING_INSTRUCTIONS>>\n" } }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{ "type": "object", "properties": { "publisher": { "type": "object", "properties": { "name": { "type": "string" }, "address": { "type": "string" }, "website": { "type": "string" }, "email": { "type": "string" }, "media": { "type": "array", "items": { "type": "object", "properties": { "purpose": { "type": "string" }, "uri": { "type": "string" } } } } } }, "app": { "type": "object", "properties": { "name": { "type": "string" }, "address": { "type": "string" }, "android_package": { "type": "string" }, "urls": { "type": "object", "properties": { "license_url": { "type": "string" }, "copyright_url": { "type": "string" }, "privacy_policy_url": { "type": "string" }, "website": { "type": "string" } } }, "media": { "type": "array", "items": { "type": "object", "properties": { "purpose": { "type": "string" }, "uri": { "type": "string" } } } } } }, "release": { "type": "object", "properties": { "address": { "type": "string" }, "media": { "type": "array", "items": { "type": "object", "properties": { "purpose": { "type": "string" }, "uri": { "type": "string" } }, "required": ["purpose", "uri"] } }, "files": { "type": "array", "items": { "type": "object", "properties": { "purpose": { "type": "string" }, "uri": { "type": "string" } } } }, "catalog": { "type": "object", "properties": { "en-US": { "type": "object", "properties": { "name": { "type": "string" }, "short_description": { "type": "string" }, "long_description": { "type": "string" }, "new_in_version": { "type": "string" }, "saga_features": { "type": "string" } }, "required": ["short_description"] } } } } }, "solana_mobile_dapp_publisher_portal": { "type": "object", "properties": { "google_store_package": { "type": "string" }, "testing_instructions": { "type": "string" } } } } }
|
package/lib/esm/index.js
CHANGED
|
@@ -2,8 +2,9 @@ import { Command } from "commander";
|
|
|
2
2
|
import { validateCommand } from "./commands/index.js";
|
|
3
3
|
import { createAppCommand, createPublisherCommand, createReleaseCommand } from "./commands/create/index.js";
|
|
4
4
|
import { publishRemoveCommand, publishSubmitCommand, publishSupportCommand, publishUpdateCommand } from "./commands/publish/index.js";
|
|
5
|
-
import { checkForSelfUpdate, checkSubmissionNetwork, generateNetworkSuffix,
|
|
5
|
+
import { checkForSelfUpdate, checkSubmissionNetwork, Constants, generateNetworkSuffix, getConfigWithChecks, parseKeypair, showMessage } from "./utils.js";
|
|
6
6
|
import * as dotenv from "dotenv";
|
|
7
|
+
import { initScaffold } from "./commands/scaffolding/index.js";
|
|
7
8
|
dotenv.config();
|
|
8
9
|
const hasAddressInConfig = ({ address }) => {
|
|
9
10
|
return !!address;
|
|
@@ -21,20 +22,36 @@ function resolveBuildToolsPath(buildToolsPath) {
|
|
|
21
22
|
// No path was specified
|
|
22
23
|
return;
|
|
23
24
|
}
|
|
25
|
+
/**
|
|
26
|
+
* This method should be updated with each new release of the CLI, and just do nothing when there isn't anything to report
|
|
27
|
+
*/
|
|
28
|
+
function latestReleaseMessage() {
|
|
29
|
+
showMessage(`Publishing Tools Version ${Constants.CLI_VERSION}`, "- The new field \`short_description\` has been added to the set of strings required in the `catalog` section for each locale.\n" +
|
|
30
|
+
"- You can now specify a release-specific icon in the release \`media\` section in your configuration file.", "warning");
|
|
31
|
+
}
|
|
24
32
|
async function tryWithErrorMessage(block) {
|
|
25
33
|
try {
|
|
26
34
|
await block();
|
|
27
35
|
}
|
|
28
36
|
catch (e) {
|
|
29
37
|
const errorMsg = e?.message ?? "";
|
|
30
|
-
showMessage("Error", errorMsg,
|
|
38
|
+
showMessage("Error", errorMsg, "error");
|
|
31
39
|
}
|
|
32
40
|
}
|
|
33
41
|
async function main() {
|
|
34
42
|
program
|
|
35
43
|
.name("dapp-store")
|
|
36
|
-
.version(
|
|
44
|
+
.version(Constants.CLI_VERSION)
|
|
37
45
|
.description("CLI to assist with publishing to the Saga Dapp Store");
|
|
46
|
+
const initCommand = program
|
|
47
|
+
.command("init")
|
|
48
|
+
.description("First-time initialization of tooling configuration")
|
|
49
|
+
.action(async () => {
|
|
50
|
+
tryWithErrorMessage(async () => {
|
|
51
|
+
const msg = initScaffold();
|
|
52
|
+
showMessage("Initialized", msg);
|
|
53
|
+
});
|
|
54
|
+
});
|
|
38
55
|
const createCommand = program
|
|
39
56
|
.command("create")
|
|
40
57
|
.description("Create a `publisher`, `app`, or `release`");
|
|
@@ -46,6 +63,7 @@ async function main() {
|
|
|
46
63
|
.option("-d, --dry-run", "Flag for dry run. Doesn't mint an NFT")
|
|
47
64
|
.action(async ({ keypair, url, dryRun }) => {
|
|
48
65
|
tryWithErrorMessage(async () => {
|
|
66
|
+
latestReleaseMessage();
|
|
49
67
|
await checkForSelfUpdate();
|
|
50
68
|
const signer = parseKeypair(keypair);
|
|
51
69
|
if (signer) {
|
|
@@ -65,8 +83,9 @@ async function main() {
|
|
|
65
83
|
.option("-d, --dry-run", "Flag for dry run. Doesn't mint an NFT")
|
|
66
84
|
.action(async ({ publisherMintAddress, keypair, url, dryRun }) => {
|
|
67
85
|
tryWithErrorMessage(async () => {
|
|
86
|
+
latestReleaseMessage();
|
|
68
87
|
await checkForSelfUpdate();
|
|
69
|
-
const config = await
|
|
88
|
+
const config = await getConfigWithChecks();
|
|
70
89
|
if (!hasAddressInConfig(config.publisher) && !publisherMintAddress) {
|
|
71
90
|
throw new Error("Either specify a publisher mint address in the config file or specify as a CLI argument to this command.");
|
|
72
91
|
}
|
|
@@ -94,12 +113,13 @@ async function main() {
|
|
|
94
113
|
.option("-b, --build-tools-path <build-tools-path>", "Path to Android build tools which contains AAPT2")
|
|
95
114
|
.action(async ({ appMintAddress, keypair, url, dryRun, buildToolsPath }) => {
|
|
96
115
|
tryWithErrorMessage(async () => {
|
|
116
|
+
latestReleaseMessage();
|
|
97
117
|
await checkForSelfUpdate();
|
|
98
118
|
const resolvedBuildToolsPath = resolveBuildToolsPath(buildToolsPath);
|
|
99
119
|
if (resolvedBuildToolsPath === undefined) {
|
|
100
120
|
throw new Error("Please specify an Android build tools directory in the .env file or via the command line argument.");
|
|
101
121
|
}
|
|
102
|
-
const config = await
|
|
122
|
+
const config = await getConfigWithChecks();
|
|
103
123
|
if (!hasAddressInConfig(config.app) && !appMintAddress) {
|
|
104
124
|
throw new Error("Either specify an app mint address in the config file or specify as a CLI argument to this command");
|
|
105
125
|
}
|
|
@@ -125,6 +145,7 @@ async function main() {
|
|
|
125
145
|
.option("-b, --build-tools-path <build-tools-path>", "Path to Android build tools which contains AAPT2")
|
|
126
146
|
.action(async ({ keypair, buildToolsPath }) => {
|
|
127
147
|
tryWithErrorMessage(async () => {
|
|
148
|
+
latestReleaseMessage();
|
|
128
149
|
await checkForSelfUpdate();
|
|
129
150
|
const resolvedBuildToolsPath = resolveBuildToolsPath(buildToolsPath);
|
|
130
151
|
if (resolvedBuildToolsPath === undefined) {
|
|
@@ -149,15 +170,15 @@ async function main() {
|
|
|
149
170
|
.requiredOption("-k, --keypair <path-to-keypair-file>", "Path to keypair file")
|
|
150
171
|
.requiredOption("--complies-with-solana-dapp-store-policies", "An attestation that the app complies with the Solana dApp Store policies")
|
|
151
172
|
.requiredOption("--requestor-is-authorized", "An attestation that the party making this Solana dApp publisher portal request is authorized to do so")
|
|
152
|
-
.option("-a, --app-mint-address <app-mint-address>", "The mint address of the app NFT. If not specified, the value from config
|
|
153
|
-
.option("-r, --release-mint-address <release-mint-address>", "The mint address of the release NFT. If not specified, the value from config
|
|
173
|
+
.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.")
|
|
174
|
+
.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.")
|
|
154
175
|
.option("-u, --url <url>", "RPC URL", "https://devnet.genesysgo.net")
|
|
155
176
|
.option("-d, --dry-run", "Flag for dry run. Doesn't submit the request to the publisher portal.")
|
|
156
177
|
.action(async ({ appMintAddress, releaseMintAddress, keypair, url, compliesWithSolanaDappStorePolicies, requestorIsAuthorized, dryRun, }) => {
|
|
157
178
|
tryWithErrorMessage(async () => {
|
|
158
179
|
await checkForSelfUpdate();
|
|
159
180
|
await checkSubmissionNetwork(url);
|
|
160
|
-
const config = await
|
|
181
|
+
const config = await getConfigWithChecks();
|
|
161
182
|
if (!hasAddressInConfig(config.release) && !releaseMintAddress) {
|
|
162
183
|
throw new Error("Either specify a release mint address in the config file or specify as a CLI argument to this command.");
|
|
163
184
|
}
|
|
@@ -183,8 +204,8 @@ async function main() {
|
|
|
183
204
|
.requiredOption("-k, --keypair <path-to-keypair-file>", "Path to keypair file")
|
|
184
205
|
.requiredOption("--complies-with-solana-dapp-store-policies", "An attestation that the app complies with the Solana dApp Store policies")
|
|
185
206
|
.requiredOption("--requestor-is-authorized", "An attestation that the party making this Solana dApp publisher portal request is authorized to do so")
|
|
186
|
-
.option("-a, --app-mint-address <app-mint-address>", "The mint address of the app NFT. If not specified, the value from config
|
|
187
|
-
.option("-r, --release-mint-address <release-mint-address>", "The mint address of the release NFT. If not specified, the value from config
|
|
207
|
+
.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.")
|
|
208
|
+
.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.")
|
|
188
209
|
.option("-c, --critical", "Flag for a critical app update request")
|
|
189
210
|
.option("-u, --url <url>", "RPC URL", "https://devnet.genesysgo.net")
|
|
190
211
|
.option("-d, --dry-run", "Flag for dry run. Doesn't submit the request to the publisher portal.")
|
|
@@ -192,7 +213,7 @@ async function main() {
|
|
|
192
213
|
tryWithErrorMessage(async () => {
|
|
193
214
|
await checkForSelfUpdate();
|
|
194
215
|
await checkSubmissionNetwork(url);
|
|
195
|
-
const config = await
|
|
216
|
+
const config = await getConfigWithChecks();
|
|
196
217
|
if (!hasAddressInConfig(config.release) && !releaseMintAddress) {
|
|
197
218
|
throw new Error("Either specify a release mint address in the config file or specify as a CLI argument to this command.");
|
|
198
219
|
}
|
|
@@ -218,8 +239,8 @@ async function main() {
|
|
|
218
239
|
.description("Remove an existing app from the Solana Mobile dApp publisher portal")
|
|
219
240
|
.requiredOption("-k, --keypair <path-to-keypair-file>", "Path to keypair file")
|
|
220
241
|
.requiredOption("--requestor-is-authorized", "An attestation that the party making this Solana dApp publisher portal request is authorized to do so")
|
|
221
|
-
.option("-a, --app-mint-address <app-mint-address>", "The mint address of the app NFT. If not specified, the value from config
|
|
222
|
-
.option("-r, --release-mint-address <release-mint-address>", "The mint address of the release NFT. If not specified, the value from config
|
|
242
|
+
.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.")
|
|
243
|
+
.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.")
|
|
223
244
|
.option("-c, --critical", "Flag for a critical app removal request")
|
|
224
245
|
.option("-u, --url <url>", "RPC URL", "https://devnet.genesysgo.net")
|
|
225
246
|
.option("-d, --dry-run", "Flag for dry run. Doesn't submit the request to the publisher portal.")
|
|
@@ -227,7 +248,7 @@ async function main() {
|
|
|
227
248
|
tryWithErrorMessage(async () => {
|
|
228
249
|
await checkForSelfUpdate();
|
|
229
250
|
await checkSubmissionNetwork(url);
|
|
230
|
-
const config = await
|
|
251
|
+
const config = await getConfigWithChecks();
|
|
231
252
|
if (!hasAddressInConfig(config.release) && !releaseMintAddress) {
|
|
232
253
|
throw new Error("Either specify a release mint address in the config file or specify as a CLI argument to this command.");
|
|
233
254
|
}
|
|
@@ -252,15 +273,15 @@ async function main() {
|
|
|
252
273
|
.description("Submit a support request for an existing app on the Solana Mobile dApp publisher portal")
|
|
253
274
|
.requiredOption("-k, --keypair <path-to-keypair-file>", "Path to keypair file")
|
|
254
275
|
.requiredOption("--requestor-is-authorized", "An attestation that the party making this Solana dApp publisher portal request is authorized to do so")
|
|
255
|
-
.option("-a, --app-mint-address <app-mint-address>", "The mint address of the app NFT. If not specified, the value from config
|
|
256
|
-
.option("-r, --release-mint-address <release-mint-address>", "The mint address of the release NFT. If not specified, the value from config
|
|
276
|
+
.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.")
|
|
277
|
+
.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.")
|
|
257
278
|
.option("-u, --url <url>", "RPC URL", "https://devnet.genesysgo.net")
|
|
258
279
|
.option("-d, --dry-run", "Flag for dry run. Doesn't submit the request to the publisher portal.")
|
|
259
280
|
.action(async (requestDetails, { appMintAddress, releaseMintAddress, keypair, url, requestorIsAuthorized, dryRun }) => {
|
|
260
281
|
tryWithErrorMessage(async () => {
|
|
261
282
|
await checkForSelfUpdate();
|
|
262
283
|
await checkSubmissionNetwork(url);
|
|
263
|
-
const config = await
|
|
284
|
+
const config = await getConfigWithChecks();
|
|
264
285
|
if (!hasAddressInConfig(config.release) && !releaseMintAddress) {
|
|
265
286
|
throw new Error("Either specify a release mint address in the config file or specify as a CLI argument to this command.");
|
|
266
287
|
}
|