@solana-mobile/dapp-store-cli 0.1.8 → 0.2.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/publish/remove.js +5 -1
- package/lib/esm/commands/publish/remove.js.map +1 -1
- package/lib/esm/commands/publish/submit.js +7 -3
- package/lib/esm/commands/publish/submit.js.map +1 -1
- package/lib/esm/commands/publish/support.js +5 -1
- package/lib/esm/commands/publish/support.js.map +1 -1
- package/lib/esm/commands/publish/update.js +5 -1
- 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 +4 -13
- 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 +24 -10
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/package.json +6 -3
- package/lib/esm/utils.js +54 -19
- 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 +9 -1
- package/lib/types/utils.d.ts.map +1 -1
- package/package.json +6 -3
- package/src/commands/publish/remove.ts +8 -1
- package/src/commands/publish/submit.ts +12 -4
- package/src/commands/publish/support.ts +8 -1
- package/src/commands/publish/update.ts +8 -1
- package/src/commands/scaffolding/index.ts +1 -0
- package/src/commands/scaffolding/init.ts +19 -0
- package/src/commands/validate.ts +5 -12
- 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 +34 -10
- package/src/prebuild_schema/publishing_source.yaml +44 -0
- package/src/prebuild_schema/schemagen.js +20 -0
- package/src/utils.ts +69 -22
- package/lib/esm/config/schema.json +0 -195
package/lib/esm/utils.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import fs from "fs";
|
|
2
|
-
import { Keypair } from "@solana/web3.js";
|
|
2
|
+
import { Keypair, PublicKey } from "@solana/web3.js";
|
|
3
3
|
import { getConfig } from "./config/index.js";
|
|
4
4
|
import debugModule from "debug";
|
|
5
5
|
import { dump } from "js-yaml";
|
|
@@ -11,17 +11,35 @@ import { imageSize } from "image-size";
|
|
|
11
11
|
import updateNotifier from "update-notifier";
|
|
12
12
|
import cliPackage from "./package.json" assert { type: "json" };
|
|
13
13
|
import boxen from "boxen";
|
|
14
|
+
import ver from "semver";
|
|
14
15
|
import { CachedStorageDriver } from "./upload/CachedStorageDriver.js";
|
|
15
16
|
const runImgSize = util.promisify(imageSize);
|
|
16
17
|
const runExec = util.promisify(exec);
|
|
18
|
+
export class Constants {
|
|
19
|
+
}
|
|
20
|
+
Constants.CLI_VERSION = "0.2.0";
|
|
21
|
+
Constants.CONFIG_FILE_NAME = "config.yaml";
|
|
17
22
|
export const debug = debugModule("CLI");
|
|
18
23
|
export const checkForSelfUpdate = async () => {
|
|
19
24
|
const notifier = updateNotifier({ pkg: cliPackage });
|
|
20
25
|
const updateInfo = await notifier.fetchInfo();
|
|
21
|
-
|
|
26
|
+
const latestVer = new ver.SemVer(updateInfo.latest);
|
|
27
|
+
const currentVer = new ver.SemVer(updateInfo.current);
|
|
28
|
+
if (latestVer.major > currentVer.major || latestVer.minor > currentVer.minor) {
|
|
22
29
|
throw new Error("Please update to the latest version of the dApp Store CLI before proceeding.");
|
|
23
30
|
}
|
|
24
31
|
};
|
|
32
|
+
export const checkMintedStatus = async (conn, pubAddr, appAddr, releaseAddr) => {
|
|
33
|
+
const results = await conn.getMultipleAccountsInfo([
|
|
34
|
+
new PublicKey(pubAddr),
|
|
35
|
+
new PublicKey(appAddr),
|
|
36
|
+
new PublicKey(releaseAddr),
|
|
37
|
+
]);
|
|
38
|
+
const rentAccounts = results.filter((item) => !(item == undefined) && item?.lamports > 0);
|
|
39
|
+
if (rentAccounts?.length != 3) {
|
|
40
|
+
throw new Error("Please ensure you have minted all of your NFTs before submitting to the Solana Mobile dApp publisher portal.");
|
|
41
|
+
}
|
|
42
|
+
};
|
|
25
43
|
export const parseKeypair = (pathToKeypairFile) => {
|
|
26
44
|
try {
|
|
27
45
|
const keypairFile = fs.readFileSync(pathToKeypairFile, "utf-8");
|
|
@@ -42,7 +60,7 @@ const AaptPrefixes = {
|
|
|
42
60
|
localePrefix: "locales: ",
|
|
43
61
|
};
|
|
44
62
|
export const getConfigFile = async (buildToolsDir = null) => {
|
|
45
|
-
const configFilePath = `${process.cwd()}
|
|
63
|
+
const configFilePath = `${process.cwd()}/${Constants.CONFIG_FILE_NAME}`;
|
|
46
64
|
const config = await getConfig(configFilePath);
|
|
47
65
|
if (buildToolsDir && fs.lstatSync(buildToolsDir).isDirectory()) {
|
|
48
66
|
// We validate that the config is going to have at least one installable asset
|
|
@@ -56,27 +74,25 @@ export const getConfigFile = async (buildToolsDir = null) => {
|
|
|
56
74
|
const publisherIcon = config.publisher.media?.find((asset) => asset.purpose === "icon")?.uri;
|
|
57
75
|
if (publisherIcon) {
|
|
58
76
|
const iconPath = path.join(process.cwd(), publisherIcon);
|
|
59
|
-
|
|
60
|
-
throw new Error("Please check the path to your Publisher icon and ensure the file is a jpeg, png, or webp file.");
|
|
61
|
-
}
|
|
77
|
+
await checkIconCompatibility(iconPath, "Publisher");
|
|
62
78
|
const iconBuffer = await fs.promises.readFile(iconPath);
|
|
63
|
-
if (await checkIconDimensions(iconPath)) {
|
|
64
|
-
throw new Error("Icons must have square dimensions and be no greater than 512px by 512px.");
|
|
65
|
-
}
|
|
66
79
|
config.publisher.icon = toMetaplexFile(iconBuffer, publisherIcon);
|
|
67
80
|
}
|
|
68
81
|
const appIcon = config.app.media?.find((asset) => asset.purpose === "icon")?.uri;
|
|
69
82
|
if (appIcon) {
|
|
70
83
|
const iconPath = path.join(process.cwd(), appIcon);
|
|
71
|
-
|
|
72
|
-
throw new Error("Please check the path to your App icon and ensure the file is a jpeg, png, or webp file.");
|
|
73
|
-
}
|
|
84
|
+
await checkIconCompatibility(iconPath, "App");
|
|
74
85
|
const iconBuffer = await fs.promises.readFile(iconPath);
|
|
75
|
-
if (await checkIconDimensions(iconPath)) {
|
|
76
|
-
throw new Error("Icons must have square dimensions and be no greater than 512px by 512px.");
|
|
77
|
-
}
|
|
78
86
|
config.app.icon = toMetaplexFile(iconBuffer, appIcon);
|
|
79
87
|
}
|
|
88
|
+
const releaseIcon = config.release.media?.find((asset) => asset.purpose === "icon")?.uri;
|
|
89
|
+
if (releaseIcon) {
|
|
90
|
+
const iconPath = path.join(process.cwd(), releaseIcon);
|
|
91
|
+
await checkIconCompatibility(iconPath, "Release");
|
|
92
|
+
}
|
|
93
|
+
if (!appIcon && !releaseIcon) {
|
|
94
|
+
throw new Error("Please specify at least one media entry of type icon in your configuration file");
|
|
95
|
+
}
|
|
80
96
|
config.release.media.forEach((item) => {
|
|
81
97
|
const imagePath = path.join(process.cwd(), item.uri);
|
|
82
98
|
if (!fs.existsSync(imagePath) || !checkImageExtension(imagePath)) {
|
|
@@ -85,6 +101,14 @@ export const getConfigFile = async (buildToolsDir = null) => {
|
|
|
85
101
|
});
|
|
86
102
|
return config;
|
|
87
103
|
};
|
|
104
|
+
const checkIconCompatibility = async (path, typeString) => {
|
|
105
|
+
if (!fs.existsSync(path) || !checkImageExtension(path)) {
|
|
106
|
+
throw new Error(`Please check the path to your ${typeString} icon and ensure the file is a jpeg, png, or webp file.`);
|
|
107
|
+
}
|
|
108
|
+
if (await checkIconDimensions(path)) {
|
|
109
|
+
throw new Error("Icons must have square dimensions and be no greater than 512px by 512px.");
|
|
110
|
+
}
|
|
111
|
+
};
|
|
88
112
|
const checkImageExtension = (uri) => {
|
|
89
113
|
const fileExt = path.extname(uri).toLowerCase();
|
|
90
114
|
return (fileExt == ".png" ||
|
|
@@ -92,15 +116,26 @@ const checkImageExtension = (uri) => {
|
|
|
92
116
|
fileExt == ".jpeg" ||
|
|
93
117
|
fileExt == ".webp");
|
|
94
118
|
};
|
|
119
|
+
export const isDevnet = (rpcUrl) => {
|
|
120
|
+
return rpcUrl.indexOf("devnet") != -1;
|
|
121
|
+
};
|
|
122
|
+
export const isTestnet = (rpcUrl) => {
|
|
123
|
+
return rpcUrl.indexOf("testnet") != -1;
|
|
124
|
+
};
|
|
125
|
+
export const checkSubmissionNetwork = (rpcUrl) => {
|
|
126
|
+
if (isDevnet(rpcUrl) || isTestnet(rpcUrl)) {
|
|
127
|
+
throw new Error("It looks like you are attempting to submit a request with a devnet or testnet RPC endpoint. Please ensure that your NFTs are minted on mainnet beta, and re-run with a mainnet beta RPC endpoint.");
|
|
128
|
+
}
|
|
129
|
+
};
|
|
95
130
|
export const generateNetworkSuffix = (rpcUrl) => {
|
|
96
131
|
let suffix = "";
|
|
97
|
-
if (rpcUrl
|
|
132
|
+
if (isDevnet(rpcUrl)) {
|
|
98
133
|
suffix = "?cluster=devnet";
|
|
99
134
|
}
|
|
100
|
-
else if (rpcUrl
|
|
135
|
+
else if (isTestnet(rpcUrl)) {
|
|
101
136
|
suffix = "?cluster=testnet";
|
|
102
137
|
}
|
|
103
|
-
else
|
|
138
|
+
else {
|
|
104
139
|
suffix = "?cluster=mainnet";
|
|
105
140
|
}
|
|
106
141
|
return suffix;
|
|
@@ -166,7 +201,7 @@ export const saveToConfig = async ({ publisher, app, release, }) => {
|
|
|
166
201
|
solana_mobile_dapp_publisher_portal: currentConfig.solana_mobile_dapp_publisher_portal,
|
|
167
202
|
};
|
|
168
203
|
// TODO(jon): Verify the contents of the YAML file
|
|
169
|
-
fs.writeFileSync(`${process.cwd()}
|
|
204
|
+
fs.writeFileSync(`${process.cwd()}/${Constants.CONFIG_FILE_NAME}`, dump(newConfig));
|
|
170
205
|
};
|
|
171
206
|
export const getMetaplexInstance = (connection, keypair) => {
|
|
172
207
|
const metaplex = Metaplex.make(connection).use(keypairIdentity(keypair));
|
package/lib/esm/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC;AAGpB,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC;AAGpB,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAErD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,WAAW,MAAM,OAAO,CAAC;AAChC,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC/B,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;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sources":["../../../../src/commands/create/app.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,OAAO,EAGR,MAAM,iBAAiB,CAAC;AAgDzB,KAAK,qBAAqB,GAAG;IAC3B,oBAAoB,EAAE,MAAM,CAAC;IAC7B,MAAM,EAAE,OAAO,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,eAAO,MAAM,gBAAgB,mDAK1B,qBAAqB;;EAqBvB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"release.d.ts","sourceRoot":"","sources":["../../../../src/commands/create/release.ts"],"names":[],"mappings":"AAMA,OAAO,EAEL,OAAO,EAGR,MAAM,iBAAiB,CAAC;AASzB,
|
|
1
|
+
{"version":3,"file":"release.d.ts","sourceRoot":"","sources":["../../../../src/commands/create/release.ts"],"names":[],"mappings":"AAMA,OAAO,EAEL,OAAO,EAGR,MAAM,iBAAiB,CAAC;AASzB,KAAK,yBAAyB,GAAG;IAC/B,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,OAAO,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC;AAgDF,eAAO,MAAM,oBAAoB,6DAM9B,yBAAyB;;cAuB3B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remove.d.ts","sourceRoot":"","sources":["../../../../src/commands/publish/remove.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAMtD,
|
|
1
|
+
{"version":3,"file":"remove.d.ts","sourceRoot":"","sources":["../../../../src/commands/publish/remove.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAMtD,KAAK,yBAAyB,GAAG;IAC/B,cAAc,EAAE,MAAM,CAAC;IACvB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,MAAM,EAAE,OAAO,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,OAAO,CAAC;IAChB,qBAAqB,EAAE,OAAO,CAAC;IAC/B,QAAQ,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,eAAO,MAAM,oBAAoB,kGAQ9B,yBAAyB,kBAmC3B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"submit.d.ts","sourceRoot":"","sources":["../../../../src/commands/publish/submit.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"submit.d.ts","sourceRoot":"","sources":["../../../../src/commands/publish/submit.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2B,OAAO,EAAa,MAAM,iBAAiB,CAAC;AAO9E,KAAK,yBAAyB,GAAG;IAC/B,cAAc,EAAE,MAAM,CAAC;IACvB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,MAAM,EAAE,OAAO,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,OAAO,CAAC;IAChB,mCAAmC,EAAE,OAAO,CAAC;IAC7C,qBAAqB,EAAE,OAAO,CAAC;CAChC,CAAC;AAEF,eAAO,MAAM,oBAAoB,6HAQ9B,yBAAyB,kBA0C3B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"support.d.ts","sourceRoot":"","sources":["../../../../src/commands/publish/support.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAMtD,
|
|
1
|
+
{"version":3,"file":"support.d.ts","sourceRoot":"","sources":["../../../../src/commands/publish/support.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAMtD,KAAK,0BAA0B,GAAG;IAChC,cAAc,EAAE,MAAM,CAAC;IACvB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,MAAM,EAAE,OAAO,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,OAAO,CAAC;IAChB,qBAAqB,EAAE,OAAO,CAAC;IAC/B,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,eAAO,MAAM,qBAAqB,wGAQ/B,0BAA0B,kBAmC5B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../../../src/commands/publish/update.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAMtD,
|
|
1
|
+
{"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../../../src/commands/publish/update.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAMtD,KAAK,yBAAyB,GAAG;IAC/B,cAAc,EAAE,MAAM,CAAC;IACvB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,MAAM,EAAE,OAAO,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,OAAO,CAAC;IAChB,mCAAmC,EAAE,OAAO,CAAC;IAC7C,qBAAqB,EAAE,OAAO,CAAC;IAC/B,QAAQ,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,eAAO,MAAM,oBAAoB,uIAS9B,yBAAyB,kBA2C3B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/commands/scaffolding/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../../src/commands/scaffolding/init.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,YAAY,QAAO,MAW/B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../../src/commands/validate.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../../src/commands/validate.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAI/C,eAAO,MAAM,eAAe;YAIlB,OAAO;;mBAmDhB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/config/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,GAAG,EACH,SAAS,EACT,OAAO,EACP,+BAA+B,EAChC,MAAM,4CAA4C,CAAC;AAUpD,MAAM,WAAW,SAAS;IACxB,SAAS,EAAE,SAAS,CAAC;IACrB,GAAG,EAAE,GAAG,CAAC;IACT,OAAO,EAAE,OAAO,CAAC;IACjB,mCAAmC,EAAE,+BAA+B,CAAC;CACtE;AAKD,eAAO,MAAM,SAAS,eAAsB,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/config/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,GAAG,EACH,SAAS,EACT,OAAO,EACP,+BAA+B,EAChC,MAAM,4CAA4C,CAAC;AAUpD,MAAM,WAAW,SAAS;IACxB,SAAS,EAAE,SAAS,CAAC;IACrB,GAAG,EAAE,GAAG,CAAC;IACT,OAAO,EAAE,OAAO,CAAC;IACjB,mCAAmC,EAAE,+BAA+B,CAAC;CACtE;AAKD,eAAO,MAAM,SAAS,eAAsB,MAAM,uBAYjD,CAAC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { MetaplexFile, StorageDriver } from "@metaplex-foundation/js";
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
type URI = string;
|
|
3
|
+
type Asset = {
|
|
4
4
|
path: string;
|
|
5
5
|
sha256: string;
|
|
6
6
|
uri: URI;
|
|
7
7
|
};
|
|
8
|
-
export
|
|
8
|
+
export type AssetManifestSchema = {
|
|
9
9
|
schema_version: string;
|
|
10
10
|
assets: {
|
|
11
11
|
[path: string]: Asset;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CachedStorageDriver.d.ts","sourceRoot":"","sources":["../../../src/upload/CachedStorageDriver.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAG3E,
|
|
1
|
+
{"version":3,"file":"CachedStorageDriver.d.ts","sourceRoot":"","sources":["../../../src/upload/CachedStorageDriver.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAG3E,KAAK,GAAG,GAAG,MAAM,CAAC;AAElB,KAAK,KAAK,GAAG;IACX,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,GAAG,CAAC;CACV,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE;QACN,CAAC,IAAI,EAAE,MAAM,GAAG,KAAK,CAAC;KACvB,CAAC;CACH,CAAC;AAGF,qBAAa,mBAAoB,YAAW,aAAa;IAGvD,MAAM,CAAC,QAAQ,CAAC,cAAc,SAAS;IAEvC,aAAa,EAAE,mBAAmB,CAAC;IACnC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,aAAa,EAAE,aAAa,CAAC;gBAG3B,aAAa,EAAE,aAAa,EAC5B,EAAE,iBAAiB,EAAE,EAAE;QAAE,iBAAiB,EAAE,MAAM,CAAA;KAAE;IAWhD,cAAc,CAAC,KAAK,EAAE,MAAM;IAIlC,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,mBAAmB,GAAG,SAAS;IAWpE,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,EAAE;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE;IAOxD,MAAM,CAAC,IAAI,EAAE,YAAY,GAAG,OAAO,CAAC,MAAM,CAAC;CA0ClD"}
|
package/lib/types/utils.d.ts
CHANGED
|
@@ -4,13 +4,21 @@ import { Keypair } from "@solana/web3.js";
|
|
|
4
4
|
import type { CLIConfig } from "./config/index.js";
|
|
5
5
|
import debugModule from "debug";
|
|
6
6
|
import { Metaplex } from "@metaplex-foundation/js";
|
|
7
|
+
export declare class Constants {
|
|
8
|
+
static CLI_VERSION: string;
|
|
9
|
+
static CONFIG_FILE_NAME: string;
|
|
10
|
+
}
|
|
7
11
|
export declare const debug: debugModule.Debugger;
|
|
8
12
|
export declare const checkForSelfUpdate: () => Promise<void>;
|
|
13
|
+
export declare const checkMintedStatus: (conn: Connection, pubAddr: string, appAddr: string, releaseAddr: string) => Promise<void>;
|
|
9
14
|
export declare const parseKeypair: (pathToKeypairFile: string) => Keypair | undefined;
|
|
10
15
|
export declare const getConfigFile: (buildToolsDir?: string | null) => Promise<CLIConfig>;
|
|
16
|
+
export declare const isDevnet: (rpcUrl: string) => boolean;
|
|
17
|
+
export declare const isTestnet: (rpcUrl: string) => boolean;
|
|
18
|
+
export declare const checkSubmissionNetwork: (rpcUrl: string) => void;
|
|
11
19
|
export declare const generateNetworkSuffix: (rpcUrl: string) => string;
|
|
12
20
|
export declare const showMessage: (titleMessage?: string, contentMessage?: string, isError?: boolean) => void;
|
|
13
|
-
|
|
21
|
+
type SaveToConfigArgs = {
|
|
14
22
|
publisher?: Pick<Publisher, "address">;
|
|
15
23
|
app?: Pick<App, "address">;
|
|
16
24
|
release?: Pick<Release, "address">;
|
package/lib/types/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAkB,GAAG,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,4CAA4C,CAAC;AAC1G,OAAO,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;IACvC,GAAG,CAAC,EAAE,IAAI,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;IAC3B,OAAO,CAAC,EAAE,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;CACpC,CAAC;AAEF,eAAO,MAAM,YAAY,iCAItB,gBAAgB,kBAyBlB,CAAC;AAEF,eAAO,MAAM,mBAAmB,eAClB,UAAU,WACb,OAAO,aAoBjB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@solana-mobile/dapp-store-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -36,22 +36,25 @@
|
|
|
36
36
|
"shx": "^0.3.4"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@solana-mobile/dapp-store-publishing-tools": "0.
|
|
39
|
+
"@solana-mobile/dapp-store-publishing-tools": "0.2.0",
|
|
40
40
|
"@solana/web3.js": "1.68.0",
|
|
41
|
+
"@types/semver": "^7.3.13",
|
|
41
42
|
"ajv": "^8.11.0",
|
|
42
43
|
"boxen": "^7.0.1",
|
|
43
44
|
"commander": "^9.4.1",
|
|
44
45
|
"debug": "^4.3.4",
|
|
45
46
|
"dotenv": "^16.0.3",
|
|
46
47
|
"esm": "^3.2.25",
|
|
48
|
+
"generate-schema": "^2.6.0",
|
|
47
49
|
"image-size": "^1.0.2",
|
|
48
50
|
"js-yaml": "^4.1.0",
|
|
51
|
+
"semver": "^7.3.8",
|
|
49
52
|
"terminal-link": "^3.0.0",
|
|
50
53
|
"tweetnacl": "1.0.3",
|
|
51
54
|
"update-notifier": "^6.0.2"
|
|
52
55
|
},
|
|
53
56
|
"scripts": {
|
|
54
57
|
"clean": "shx mkdir -p lib && shx rm -rf lib",
|
|
55
|
-
"prebuild": "pnpm run clean"
|
|
58
|
+
"prebuild": "pnpm run clean && node src/prebuild_schema/schemagen.js"
|
|
56
59
|
}
|
|
57
60
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Connection, Keypair } from "@solana/web3.js";
|
|
2
2
|
import type { SignWithPublisherKeypair } from "@solana-mobile/dapp-store-publishing-tools";
|
|
3
3
|
import { publishRemove } from "@solana-mobile/dapp-store-publishing-tools";
|
|
4
|
-
import { getConfigFile } from "../../utils.js";
|
|
4
|
+
import { checkMintedStatus, getConfigFile } from "../../utils.js";
|
|
5
5
|
import nacl from "tweetnacl";
|
|
6
6
|
|
|
7
7
|
type PublishRemoveCommandInput = {
|
|
@@ -36,9 +36,16 @@ export const publishRemoveCommand = async ({
|
|
|
36
36
|
app: appDetails,
|
|
37
37
|
release: releaseDetails,
|
|
38
38
|
} = await getConfigFile();
|
|
39
|
+
|
|
39
40
|
const sign = ((buf: Buffer) =>
|
|
40
41
|
nacl.sign(buf, signer.secretKey)) as SignWithPublisherKeypair;
|
|
41
42
|
|
|
43
|
+
const pubAddr = publisherDetails.address;
|
|
44
|
+
const appAddr = appMintAddress ?? appDetails.address;
|
|
45
|
+
const releaseAddr = releaseMintAddress ?? releaseDetails.address;
|
|
46
|
+
|
|
47
|
+
await checkMintedStatus(connection, pubAddr, appAddr, releaseAddr);
|
|
48
|
+
|
|
42
49
|
await publishRemove(
|
|
43
50
|
{ connection, sign },
|
|
44
51
|
{
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { Connection, Keypair } from "@solana/web3.js";
|
|
1
|
+
import { AccountInfo, Connection, Keypair, PublicKey } from "@solana/web3.js";
|
|
2
2
|
import type { SignWithPublisherKeypair } from "@solana-mobile/dapp-store-publishing-tools";
|
|
3
3
|
import { publishSubmit } from "@solana-mobile/dapp-store-publishing-tools";
|
|
4
4
|
import nacl from "tweetnacl";
|
|
5
|
-
import { getConfigFile } from "../../utils.js";
|
|
5
|
+
import { checkMintedStatus, getConfigFile } from "../../utils.js";
|
|
6
|
+
import { Buffer } from "buffer";
|
|
6
7
|
|
|
7
8
|
type PublishSubmitCommandInput = {
|
|
8
9
|
appMintAddress: string;
|
|
@@ -42,14 +43,21 @@ export const publishSubmitCommand = async ({
|
|
|
42
43
|
release: releaseDetails,
|
|
43
44
|
solana_mobile_dapp_publisher_portal: solanaMobileDappPublisherPortalDetails,
|
|
44
45
|
} = await getConfigFile();
|
|
46
|
+
|
|
45
47
|
const sign = ((buf: Buffer) =>
|
|
46
48
|
nacl.sign(buf, signer.secretKey)) as SignWithPublisherKeypair;
|
|
47
49
|
|
|
50
|
+
const pubAddr = publisherDetails.address;
|
|
51
|
+
const appAddr = appMintAddress ?? appDetails.address;
|
|
52
|
+
const releaseAddr = releaseMintAddress ?? releaseDetails.address;
|
|
53
|
+
|
|
54
|
+
await checkMintedStatus(connection, pubAddr, appAddr, releaseAddr);
|
|
55
|
+
|
|
48
56
|
await publishSubmit(
|
|
49
57
|
{ connection, sign },
|
|
50
58
|
{
|
|
51
|
-
appMintAddress:
|
|
52
|
-
releaseMintAddress:
|
|
59
|
+
appMintAddress: appAddr,
|
|
60
|
+
releaseMintAddress: releaseAddr,
|
|
53
61
|
publisherDetails,
|
|
54
62
|
solanaMobileDappPublisherPortalDetails,
|
|
55
63
|
compliesWithSolanaDappStorePolicies,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Connection, Keypair } from "@solana/web3.js";
|
|
2
2
|
import type { SignWithPublisherKeypair } from "@solana-mobile/dapp-store-publishing-tools";
|
|
3
3
|
import { publishSupport } from "@solana-mobile/dapp-store-publishing-tools";
|
|
4
|
-
import { getConfigFile } from "../../utils.js";
|
|
4
|
+
import { checkMintedStatus, getConfigFile } from "../../utils.js";
|
|
5
5
|
import nacl from "tweetnacl";
|
|
6
6
|
|
|
7
7
|
type PublishSupportCommandInput = {
|
|
@@ -36,9 +36,16 @@ export const publishSupportCommand = async ({
|
|
|
36
36
|
app: appDetails,
|
|
37
37
|
release: releaseDetails,
|
|
38
38
|
} = await getConfigFile();
|
|
39
|
+
|
|
39
40
|
const sign = ((buf: Buffer) =>
|
|
40
41
|
nacl.sign(buf, signer.secretKey)) as SignWithPublisherKeypair;
|
|
41
42
|
|
|
43
|
+
const pubAddr = publisherDetails.address;
|
|
44
|
+
const appAddr = appMintAddress ?? appDetails.address;
|
|
45
|
+
const releaseAddr = releaseMintAddress ?? releaseDetails.address;
|
|
46
|
+
|
|
47
|
+
await checkMintedStatus(connection, pubAddr, appAddr, releaseAddr);
|
|
48
|
+
|
|
42
49
|
await publishSupport(
|
|
43
50
|
{ connection, sign },
|
|
44
51
|
{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Connection, Keypair } from "@solana/web3.js";
|
|
2
2
|
import type { SignWithPublisherKeypair } from "@solana-mobile/dapp-store-publishing-tools";
|
|
3
3
|
import { publishUpdate } from "@solana-mobile/dapp-store-publishing-tools";
|
|
4
|
-
import { getConfigFile } from "../../utils.js";
|
|
4
|
+
import { checkMintedStatus, getConfigFile } from "../../utils.js";
|
|
5
5
|
import nacl from "tweetnacl";
|
|
6
6
|
|
|
7
7
|
type PublishUpdateCommandInput = {
|
|
@@ -44,9 +44,16 @@ export const publishUpdateCommand = async ({
|
|
|
44
44
|
release: releaseDetails,
|
|
45
45
|
solana_mobile_dapp_publisher_portal: solanaMobileDappPublisherPortalDetails,
|
|
46
46
|
} = await getConfigFile();
|
|
47
|
+
|
|
47
48
|
const sign = ((buf: Buffer) =>
|
|
48
49
|
nacl.sign(buf, signer.secretKey)) as SignWithPublisherKeypair;
|
|
49
50
|
|
|
51
|
+
const pubAddr = publisherDetails.address;
|
|
52
|
+
const appAddr = appMintAddress ?? appDetails.address;
|
|
53
|
+
const releaseAddr = releaseMintAddress ?? releaseDetails.address;
|
|
54
|
+
|
|
55
|
+
await checkMintedStatus(connection, pubAddr, appAddr, releaseAddr);
|
|
56
|
+
|
|
50
57
|
await publishUpdate(
|
|
51
58
|
{ connection, sign },
|
|
52
59
|
{
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./init.js";
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import yaml, { dump } from "js-yaml";
|
|
2
|
+
|
|
3
|
+
// eslint-disable-next-line require-extensions/require-extensions
|
|
4
|
+
import releaseSchema from "../../generated/config_obj.json" assert { type: "json" };
|
|
5
|
+
import fs from "fs";
|
|
6
|
+
import { Constants } from "../../utils.js";
|
|
7
|
+
|
|
8
|
+
export const initScaffold = (): string => {
|
|
9
|
+
const outputYaml = Constants.CONFIG_FILE_NAME;
|
|
10
|
+
const outFile = `${process.cwd()}/${outputYaml}`;
|
|
11
|
+
|
|
12
|
+
if (fs.existsSync(outFile)) {
|
|
13
|
+
throw Error("Configuration file already present; please use to intialize a new config file.");
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
fs.writeFileSync(outFile, dump(releaseSchema));
|
|
17
|
+
|
|
18
|
+
return `Your configuration file was created: ${outputYaml}`;
|
|
19
|
+
};
|
package/src/commands/validate.ts
CHANGED
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
validateApp,
|
|
6
6
|
validatePublisher,
|
|
7
7
|
validateRelease,
|
|
8
|
+
metaplexFileReplacer,
|
|
8
9
|
} from "@solana-mobile/dapp-store-publishing-tools";
|
|
9
10
|
import { debug, getConfigFile } from "../utils.js";
|
|
10
11
|
|
|
@@ -12,16 +13,6 @@ import type { Keypair } from "@solana/web3.js";
|
|
|
12
13
|
import type { MetaplexFile } from "@metaplex-foundation/js";
|
|
13
14
|
import { isMetaplexFile } from "@metaplex-foundation/js";
|
|
14
15
|
|
|
15
|
-
const metaplexFileReplacer = (k: any, v: any) => {
|
|
16
|
-
if (isMetaplexFile(v)) {
|
|
17
|
-
return {
|
|
18
|
-
...v,
|
|
19
|
-
buffer: "(suppressed)",
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
return v;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
16
|
export const validateCommand = async ({
|
|
26
17
|
signer,
|
|
27
18
|
buildToolsPath,
|
|
@@ -67,10 +58,12 @@ export const validateCommand = async ({
|
|
|
67
58
|
{ releaseDetails, appDetails, publisherDetails },
|
|
68
59
|
signer.publicKey
|
|
69
60
|
);
|
|
70
|
-
|
|
61
|
+
|
|
62
|
+
const objStringified = JSON.stringify(releaseJson, metaplexFileReplacer, 2);
|
|
63
|
+
debug("releaseJson=", objStringified);
|
|
71
64
|
|
|
72
65
|
try {
|
|
73
|
-
validateRelease(
|
|
66
|
+
validateRelease(JSON.parse(objStringified));
|
|
74
67
|
console.info(`Release JSON valid!`);
|
|
75
68
|
} catch (e) {
|
|
76
69
|
console.error(e);
|
package/src/config/index.ts
CHANGED
|
@@ -10,7 +10,7 @@ import { load } from "js-yaml";
|
|
|
10
10
|
import Ajv from "ajv";
|
|
11
11
|
|
|
12
12
|
// eslint-disable-next-line require-extensions/require-extensions
|
|
13
|
-
import schemaJson from "
|
|
13
|
+
import schemaJson from "../generated/config_schema.json" assert { type: "json" };
|
|
14
14
|
|
|
15
15
|
// TODO: Add version number return here
|
|
16
16
|
export interface CLIConfig {
|
|
@@ -25,7 +25,6 @@ const validate = ajv.compile(schemaJson);
|
|
|
25
25
|
|
|
26
26
|
export const getConfig = async (configPath: string) => {
|
|
27
27
|
const configFile = await fs.readFile(configPath, "utf-8");
|
|
28
|
-
const configJson = load(configFile);
|
|
29
28
|
|
|
30
29
|
const valid = validate(load(configFile) as object);
|
|
31
30
|
|
|
@@ -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","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"},"long_description":{"type":"string"},"new_in_version":{"type":"string"},"saga_features":{"type":"string"}}}}}}},"solana_mobile_dapp_publisher_portal":{"type":"object","properties":{"google_store_package":{"type":"string"},"testing_instructions":{"type":"string"}}}}}
|