@solana-mobile/dapp-store-cli 0.1.1-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/LICENSE +201 -0
- package/README.md +142 -0
- package/bin/dapp-store.js +3 -0
- package/lib/esm/commands/create/app.js +37 -0
- package/lib/esm/commands/create/app.js.map +1 -0
- package/lib/esm/commands/create/index.js +44 -0
- package/lib/esm/commands/create/index.js.map +1 -0
- package/lib/esm/commands/create/publisher.js +33 -0
- package/lib/esm/commands/create/publisher.js.map +1 -0
- package/lib/esm/commands/create/release.js +48 -0
- package/lib/esm/commands/create/release.js.map +1 -0
- package/lib/esm/commands/index.js +4 -0
- package/lib/esm/commands/index.js.map +1 -0
- package/lib/esm/commands/publish/index.js +25 -0
- package/lib/esm/commands/publish/index.js.map +1 -0
- package/lib/esm/commands/publish/remove.js +20 -0
- package/lib/esm/commands/publish/remove.js.map +1 -0
- package/lib/esm/commands/publish/submit.js +25 -0
- package/lib/esm/commands/publish/submit.js.map +1 -0
- package/lib/esm/commands/publish/support.js +20 -0
- package/lib/esm/commands/publish/support.js.map +1 -0
- package/lib/esm/commands/publish/update.js +26 -0
- package/lib/esm/commands/publish/update.js.map +1 -0
- package/lib/esm/commands/validate.js +40 -0
- package/lib/esm/commands/validate.js.map +1 -0
- package/lib/esm/config/index.js +19 -0
- package/lib/esm/config/index.js.map +1 -0
- package/lib/esm/config/schema.json +228 -0
- package/lib/esm/index.js +259 -0
- package/lib/esm/index.js.map +1 -0
- package/lib/esm/upload/CachedStorageDriver.js +64 -0
- package/lib/esm/upload/CachedStorageDriver.js.map +1 -0
- package/lib/esm/upload/index.js +2 -0
- package/lib/esm/upload/index.js.map +1 -0
- package/lib/esm/utils.js +171 -0
- package/lib/esm/utils.js.map +1 -0
- package/lib/types/commands/create/app.d.ts +12 -0
- package/lib/types/commands/create/app.d.ts.map +1 -0
- package/lib/types/commands/create/index.d.ts +4 -0
- package/lib/types/commands/create/index.d.ts.map +1 -0
- package/lib/types/commands/create/publisher.d.ts +9 -0
- package/lib/types/commands/create/publisher.d.ts.map +1 -0
- package/lib/types/commands/create/release.d.ts +14 -0
- package/lib/types/commands/create/release.d.ts.map +1 -0
- package/lib/types/commands/index.d.ts +4 -0
- package/lib/types/commands/index.d.ts.map +1 -0
- package/lib/types/commands/publish/index.d.ts +5 -0
- package/lib/types/commands/publish/index.d.ts.map +1 -0
- package/lib/types/commands/publish/remove.d.ts +12 -0
- package/lib/types/commands/publish/remove.d.ts.map +1 -0
- package/lib/types/commands/publish/submit.d.ts +12 -0
- package/lib/types/commands/publish/submit.d.ts.map +1 -0
- package/lib/types/commands/publish/support.d.ts +12 -0
- package/lib/types/commands/publish/support.d.ts.map +1 -0
- package/lib/types/commands/publish/update.d.ts +13 -0
- package/lib/types/commands/publish/update.d.ts.map +1 -0
- package/lib/types/commands/validate.d.ts +6 -0
- package/lib/types/commands/validate.d.ts.map +1 -0
- package/lib/types/config/index.d.ts +10 -0
- package/lib/types/config/index.d.ts.map +1 -0
- package/lib/types/index.d.ts +2 -0
- package/lib/types/index.d.ts.map +1 -0
- package/lib/types/upload/CachedStorageDriver.d.ts +30 -0
- package/lib/types/upload/CachedStorageDriver.d.ts.map +1 -0
- package/lib/types/upload/index.d.ts +2 -0
- package/lib/types/upload/index.d.ts.map +1 -0
- package/lib/types/utils.d.ts +21 -0
- package/lib/types/utils.d.ts.map +1 -0
- package/package.json +49 -0
- package/src/commands/create/app.ts +88 -0
- package/src/commands/create/index.ts +48 -0
- package/src/commands/create/publisher.ts +78 -0
- package/src/commands/create/release.ts +107 -0
- package/src/commands/index.ts +3 -0
- package/src/commands/publish/index.ts +29 -0
- package/src/commands/publish/remove.ts +46 -0
- package/src/commands/publish/submit.ts +55 -0
- package/src/commands/publish/support.ts +46 -0
- package/src/commands/publish/update.ts +58 -0
- package/src/commands/validate.ts +67 -0
- package/src/config/index.ts +40 -0
- package/src/config/schema.json +228 -0
- package/src/index.ts +435 -0
- package/src/upload/CachedStorageDriver.ts +104 -0
- package/src/upload/index.ts +1 -0
- package/src/utils.ts +275 -0
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import fs from "fs";
|
|
2
|
+
import { createHash } from "crypto";
|
|
3
|
+
// TODO(jon): We need to manage the removal / replacement of assets in the manifest
|
|
4
|
+
export class CachedStorageDriver {
|
|
5
|
+
constructor(storageDriver, { assetManifestPath }) {
|
|
6
|
+
this.assetManifestPath = assetManifestPath;
|
|
7
|
+
console.info({ loading: true });
|
|
8
|
+
this.assetManifest = this.loadAssetManifest(assetManifestPath) ?? {
|
|
9
|
+
schema_version: CachedStorageDriver.SCHEMA_VERSION,
|
|
10
|
+
assets: {},
|
|
11
|
+
};
|
|
12
|
+
this.storageDriver = storageDriver;
|
|
13
|
+
}
|
|
14
|
+
async getUploadPrice(bytes) {
|
|
15
|
+
return this.storageDriver.getUploadPrice(bytes);
|
|
16
|
+
}
|
|
17
|
+
loadAssetManifest(filename) {
|
|
18
|
+
try {
|
|
19
|
+
return JSON.parse(fs.readFileSync(filename, "utf-8"));
|
|
20
|
+
}
|
|
21
|
+
catch (error) {
|
|
22
|
+
console.warn(`Failed opening ${filename}; initializing with a blank asset manifest`);
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
uploadedAsset(filename, { sha256 }) {
|
|
27
|
+
if (this.assetManifest.assets[filename]?.sha256 === sha256) {
|
|
28
|
+
return this.assetManifest.assets[filename];
|
|
29
|
+
}
|
|
30
|
+
return null;
|
|
31
|
+
}
|
|
32
|
+
async upload(file) {
|
|
33
|
+
// `inline.json` is the NFT-related metadata. This data is not stable so we'll skip the caching step
|
|
34
|
+
if (file.fileName === "inline.json") {
|
|
35
|
+
return await this.storageDriver.upload(file);
|
|
36
|
+
}
|
|
37
|
+
const hash = createHash("sha256").update(file.buffer).digest("base64");
|
|
38
|
+
console.info(JSON.stringify({
|
|
39
|
+
file: {
|
|
40
|
+
name: file.fileName,
|
|
41
|
+
disn: file.displayName,
|
|
42
|
+
un: file.uniqueName,
|
|
43
|
+
},
|
|
44
|
+
}));
|
|
45
|
+
const uploadedAsset = this.uploadedAsset(file.fileName, { sha256: hash });
|
|
46
|
+
if (uploadedAsset) {
|
|
47
|
+
console.log(`Asset ${file.fileName} already uploaded at ${uploadedAsset.uri}`);
|
|
48
|
+
return uploadedAsset.uri;
|
|
49
|
+
}
|
|
50
|
+
console.log(`Uploading ${file.fileName}`);
|
|
51
|
+
const uri = await this.storageDriver.upload(file);
|
|
52
|
+
this.assetManifest.assets[file.fileName] = {
|
|
53
|
+
path: file.fileName,
|
|
54
|
+
sha256: hash,
|
|
55
|
+
uri,
|
|
56
|
+
};
|
|
57
|
+
await fs.promises.writeFile(`${process.cwd()}/${this.assetManifestPath}`,
|
|
58
|
+
// Something is really weird, I can't seem to stringify `this.assetManifest` straight-up. Here be dragons
|
|
59
|
+
JSON.stringify({ assets: { ...this.assetManifest.assets } }, null, 2), "utf-8");
|
|
60
|
+
return uri;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
CachedStorageDriver.SCHEMA_VERSION = "0.2.2";
|
|
64
|
+
//# sourceMappingURL=CachedStorageDriver.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CachedStorageDriver.js","sourceRoot":"","sources":["../../../src/upload/CachedStorageDriver.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC;AAEpB,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAiBpC,mFAAmF;AACnF,MAAM,OAAO,mBAAmB;IAM9B,YACE,aAA4B,EAC5B,EAAE,iBAAiB,EAAiC;QAEpD,IAAI,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;QAC3C,OAAO,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;QAChC,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,IAAI;YAChE,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U;aACpB;SACF,CAAC,CACH,CAAC;QACF,MAAM,aAAa,GAAG,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;QAC1E,IAAI,aAAa,EAAE;YACjB,OAAO,CAAC,GAAG,CACT,SAAS,IAAI,CAAC,QAAQ,wBAAwB,aAAa,CAAC,GAAG,EAAE,CAClE,CAAC;YACF,OAAO,aAAa,CAAC,GAAG,CAAC;SAC1B;QAED,OAAO,CAAC,GAAG,CAAC,aAAa,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;QAC1C,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QAElD,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG;YACzC,IAAI,EAAE,IAAI,CAAC,QAAQ;YACnB,MAAM,EAAE,IAAI;YACZ,GAAG;SACJ,CAAC;QAEF,MAAM,EAAE,CAAC,QAAQ,CAAC,SAAS,CACzB,GAAG,OAAO,CAAC,GAAG,EAAE,IAAI,IAAI,CAAC,iBAAiB,EAAE;QAC5C,yGAAyG;QACzG,IAAI,CAAC,SAAS,CAAC,EAAE,MAAM,EAAE,EAAE,GAAG,IAAI,CAAC,aAAa,CAAC,MAAM,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,EACrE,OAAO,CACR,CAAC;QAEF,OAAO,GAAG,CAAC;IACb,CAAC;;AAjFe,kCAAc,GAAG,OAAO,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/upload/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC"}
|
package/lib/esm/utils.js
ADDED
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import fs from "fs";
|
|
2
|
+
import { Keypair } from "@solana/web3.js";
|
|
3
|
+
import { getConfig } from "./config/index.js";
|
|
4
|
+
import debugModule from "debug";
|
|
5
|
+
import { dump } from "js-yaml";
|
|
6
|
+
import * as util from "util";
|
|
7
|
+
import { exec } from "child_process";
|
|
8
|
+
import * as path from "path";
|
|
9
|
+
import { BundlrStorageDriver, keypairIdentity, Metaplex, toMetaplexFile, } from "@metaplex-foundation/js";
|
|
10
|
+
import { imageSize } from "image-size";
|
|
11
|
+
import { CachedStorageDriver } from "./upload/CachedStorageDriver.js";
|
|
12
|
+
const runImgSize = util.promisify(imageSize);
|
|
13
|
+
const runExec = util.promisify(exec);
|
|
14
|
+
export const debug = debugModule("CLI");
|
|
15
|
+
export const parseKeypair = (pathToKeypairFile) => {
|
|
16
|
+
try {
|
|
17
|
+
const keypairFile = fs.readFileSync(pathToKeypairFile, "utf-8");
|
|
18
|
+
return Keypair.fromSecretKey(Buffer.from(JSON.parse(keypairFile)));
|
|
19
|
+
}
|
|
20
|
+
catch (e) {
|
|
21
|
+
console.error(`Something went wrong when attempting to retrieve the keypair at ${pathToKeypairFile}`);
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
const AaptPrefixes = {
|
|
25
|
+
quoteRegex: "'(.*?)'",
|
|
26
|
+
quoteNonLazyRegex: "'(.*)'",
|
|
27
|
+
packagePrefix: "package: name=",
|
|
28
|
+
verCodePrefix: "versionCode=",
|
|
29
|
+
verNamePrefix: "versionName=",
|
|
30
|
+
sdkPrefix: "sdkVersion:",
|
|
31
|
+
permissionPrefix: "uses-permission: name=",
|
|
32
|
+
localePrefix: "locales: ",
|
|
33
|
+
};
|
|
34
|
+
export const getConfigFile = async (buildToolsDir = null) => {
|
|
35
|
+
const configFilePath = `${process.cwd()}/config.yaml`;
|
|
36
|
+
const config = await getConfig(configFilePath);
|
|
37
|
+
config.isValid = true;
|
|
38
|
+
console.info(`Pulling details from ${configFilePath}`);
|
|
39
|
+
if (buildToolsDir && fs.lstatSync(buildToolsDir).isDirectory()) {
|
|
40
|
+
// We validate that the config is going to have at least one installable asset
|
|
41
|
+
const apkEntry = config.release.files.find((asset) => asset.purpose === "install");
|
|
42
|
+
const apkPath = path.join(process.cwd(), apkEntry?.uri);
|
|
43
|
+
if (!fs.existsSync(apkPath)) {
|
|
44
|
+
showUserErrorMessage("Invalid path to APK file.");
|
|
45
|
+
config.isValid = false;
|
|
46
|
+
return config;
|
|
47
|
+
}
|
|
48
|
+
config.release.android_details = await getAndroidDetails(buildToolsDir, apkPath);
|
|
49
|
+
}
|
|
50
|
+
const publisherIcon = config.publisher.media?.find((asset) => asset.purpose === "icon")?.uri;
|
|
51
|
+
if (publisherIcon) {
|
|
52
|
+
const iconPath = path.join(process.cwd(), publisherIcon);
|
|
53
|
+
if (!fs.existsSync(iconPath) || !checkImageExtension(iconPath)) {
|
|
54
|
+
showUserErrorMessage("Please check the path to your Publisher icon ensure the file is a jpeg, png, or webp file.");
|
|
55
|
+
config.isValid = false;
|
|
56
|
+
return config;
|
|
57
|
+
}
|
|
58
|
+
const iconBuffer = await fs.promises.readFile(iconPath);
|
|
59
|
+
if (await checkIconDimensions(iconPath)) {
|
|
60
|
+
showUserErrorMessage("Icons must have square dimensions and be no greater than 512px by 512px.");
|
|
61
|
+
config.isValid = false;
|
|
62
|
+
return config;
|
|
63
|
+
}
|
|
64
|
+
config.publisher.icon = toMetaplexFile(iconBuffer, path.join("media", publisherIcon));
|
|
65
|
+
}
|
|
66
|
+
const appIcon = config.app.media?.find((asset) => asset.purpose === "icon")?.uri;
|
|
67
|
+
if (appIcon) {
|
|
68
|
+
const iconPath = path.join(process.cwd(), appIcon);
|
|
69
|
+
if (!fs.existsSync(iconPath) || !checkImageExtension(iconPath)) {
|
|
70
|
+
showUserErrorMessage("Please check the path to your App icon ensure the file is a jpeg, png, or webp file.");
|
|
71
|
+
config.isValid = false;
|
|
72
|
+
return config;
|
|
73
|
+
}
|
|
74
|
+
const iconBuffer = await fs.promises.readFile(iconPath);
|
|
75
|
+
if (await checkIconDimensions(iconPath)) {
|
|
76
|
+
showUserErrorMessage("Icons must have square dimensions and be no greater than 512px by 512px.");
|
|
77
|
+
config.isValid = false;
|
|
78
|
+
return config;
|
|
79
|
+
}
|
|
80
|
+
config.app.icon = toMetaplexFile(iconBuffer, path.join("media", appIcon));
|
|
81
|
+
}
|
|
82
|
+
config.release.media.forEach((item) => {
|
|
83
|
+
const imagePath = path.join(process.cwd(), item.uri);
|
|
84
|
+
if (!fs.existsSync(imagePath) || !checkImageExtension(imagePath)) {
|
|
85
|
+
showUserErrorMessage(`Invalid media path or file type: ${item.uri}. Please ensure the file is a jpeg, png, or webp file.`);
|
|
86
|
+
config.isValid = false;
|
|
87
|
+
return config;
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
return config;
|
|
91
|
+
};
|
|
92
|
+
const checkImageExtension = (uri) => {
|
|
93
|
+
const fileExt = path.extname(uri).toLowerCase();
|
|
94
|
+
return (fileExt == ".png" ||
|
|
95
|
+
fileExt == ".jpg" ||
|
|
96
|
+
fileExt == ".jpeg" ||
|
|
97
|
+
fileExt == ".webp");
|
|
98
|
+
};
|
|
99
|
+
export const showUserErrorMessage = (msg) => {
|
|
100
|
+
console.error("\n:::: Solana Publish CLI: Error Message ::::");
|
|
101
|
+
console.error(msg);
|
|
102
|
+
console.error("");
|
|
103
|
+
};
|
|
104
|
+
const checkIconDimensions = async (iconPath) => {
|
|
105
|
+
const size = await runImgSize(iconPath);
|
|
106
|
+
return size?.width != size?.height || (size?.width ?? 0) > 512;
|
|
107
|
+
};
|
|
108
|
+
const getAndroidDetails = async (aaptDir, apkPath) => {
|
|
109
|
+
const { stdout } = await runExec(`${aaptDir}/aapt2 dump badging ${apkPath}`);
|
|
110
|
+
const appPackage = new RegExp(AaptPrefixes.packagePrefix + AaptPrefixes.quoteRegex).exec(stdout);
|
|
111
|
+
const versionCode = new RegExp(AaptPrefixes.verCodePrefix + AaptPrefixes.quoteRegex).exec(stdout);
|
|
112
|
+
//TODO: Return this and use automatically replacing command line arg
|
|
113
|
+
//const versionName = new RegExp(prefixes.verNamePrefix + prefixes.quoteRegex).exec(stdout);
|
|
114
|
+
const minSdk = new RegExp(AaptPrefixes.sdkPrefix + AaptPrefixes.quoteRegex).exec(stdout);
|
|
115
|
+
const permissions = new RegExp(AaptPrefixes.permissionPrefix + AaptPrefixes.quoteNonLazyRegex).exec(stdout);
|
|
116
|
+
const locales = new RegExp(AaptPrefixes.localePrefix + AaptPrefixes.quoteNonLazyRegex).exec(stdout);
|
|
117
|
+
let permissionArray = Array.from(permissions?.values() ?? []);
|
|
118
|
+
if (permissionArray.length >= 2) {
|
|
119
|
+
permissionArray = permissionArray.slice(1);
|
|
120
|
+
}
|
|
121
|
+
let localeArray = Array.from(locales?.values() ?? []);
|
|
122
|
+
if (localeArray.length == 2) {
|
|
123
|
+
const localesSrc = localeArray[1];
|
|
124
|
+
localeArray = localesSrc.split("' '").slice(1);
|
|
125
|
+
}
|
|
126
|
+
return {
|
|
127
|
+
android_package: appPackage?.[1] ?? "",
|
|
128
|
+
min_sdk: parseInt(minSdk?.[1] ?? "0", 10),
|
|
129
|
+
version_code: parseInt(versionCode?.[1] ?? "0", 10),
|
|
130
|
+
permissions: permissionArray,
|
|
131
|
+
locales: localeArray,
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
export const saveToConfig = async ({ publisher, app, release, }) => {
|
|
135
|
+
const currentConfig = await getConfigFile();
|
|
136
|
+
delete currentConfig.publisher.icon;
|
|
137
|
+
delete currentConfig.app.icon;
|
|
138
|
+
const newConfig = {
|
|
139
|
+
publisher: {
|
|
140
|
+
...currentConfig.publisher,
|
|
141
|
+
address: publisher?.address ?? currentConfig.publisher.address,
|
|
142
|
+
},
|
|
143
|
+
app: {
|
|
144
|
+
...currentConfig.app,
|
|
145
|
+
address: app?.address ?? currentConfig.app.address,
|
|
146
|
+
},
|
|
147
|
+
release: {
|
|
148
|
+
...currentConfig.release,
|
|
149
|
+
address: release?.address ?? currentConfig.release.address,
|
|
150
|
+
version: release?.version ?? currentConfig.release.version,
|
|
151
|
+
},
|
|
152
|
+
solana_mobile_dapp_publisher_portal: currentConfig.solana_mobile_dapp_publisher_portal,
|
|
153
|
+
isValid: currentConfig.isValid,
|
|
154
|
+
};
|
|
155
|
+
// TODO(jon): Verify the contents of the YAML file
|
|
156
|
+
fs.writeFileSync(`${process.cwd()}/config.yaml`, dump(newConfig));
|
|
157
|
+
};
|
|
158
|
+
export const getMetaplexInstance = (connection, keypair) => {
|
|
159
|
+
const metaplex = Metaplex.make(connection).use(keypairIdentity(keypair));
|
|
160
|
+
const bundlrStorageDriver = connection.rpcEndpoint.includes("devnet")
|
|
161
|
+
? new BundlrStorageDriver(metaplex, {
|
|
162
|
+
address: "https://devnet.bundlr.network",
|
|
163
|
+
providerUrl: "https://api.devnet.solana.com",
|
|
164
|
+
})
|
|
165
|
+
: new BundlrStorageDriver(metaplex);
|
|
166
|
+
metaplex.storage().setDriver(new CachedStorageDriver(bundlrStorageDriver, {
|
|
167
|
+
assetManifestPath: "./.asset-manifest.json",
|
|
168
|
+
}));
|
|
169
|
+
return metaplex;
|
|
170
|
+
};
|
|
171
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC;AAQpB,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAE1C,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;AAC7B,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACrC,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EACL,mBAAmB,EACnB,eAAe,EACf,QAAQ,EACR,cAAc,GACf,M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,aAAa,CAAC,GAAG,OAAO,CAAC,GAAG,EAAE,cAAc,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC;AACpE,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAG,CACjC,UAAsB,EACtB,OAAgB,EAChB,EAAE;IACF,MAAM,QAAQ,GAAG,QAAQ,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC,CAAC;IAEzE,MAAM,mBAAmB,GAAG,UAAU,CAAC,WAAW,CAAC,QAAQ,CAAC,QAAQ,CAAC;QACnE,CAAC,CAAC,IAAI,mBAAmB,CAAC,QAAQ,EAAE;YAChC,OAAO,EAAE,+BAA+B;YACxC,WAAW,EAAE,+BAA+B;SAC7C,CAAC;QACJ,CAAC,CAAC,IAAI,mBAAmB,CAAC,QAAQ,CAAC,CAAC;IAEtC,QAAQ,CAAC,OAAO,EAAE,CAAC,SAAS,CAC1B,IAAI,mBAAmB,CAAC,mBAAmB,EAAE;QAC3C,iBAAiB,EAAE,wBAAwB;KAC5C,CAAC,CACH,CAAC;IACF,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Keypair } from "@solana/web3.js";
|
|
2
|
+
declare type CreateAppCommandInput = {
|
|
3
|
+
publisherMintAddress: string;
|
|
4
|
+
signer: Keypair;
|
|
5
|
+
url: string;
|
|
6
|
+
dryRun?: boolean;
|
|
7
|
+
};
|
|
8
|
+
export declare const createAppCommand: ({ signer, url, dryRun, publisherMintAddress, }: CreateAppCommandInput) => Promise<{
|
|
9
|
+
appAddress: string;
|
|
10
|
+
}>;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=app.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../../../src/commands/create/app.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,OAAO,EAGR,MAAM,iBAAiB,CAAC;AAgDzB,aAAK,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;;EAoBvB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/commands/create/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Keypair } from "@solana/web3.js";
|
|
2
|
+
export declare const createPublisherCommand: ({ signer, url, dryRun, }: {
|
|
3
|
+
signer: Keypair;
|
|
4
|
+
url: string;
|
|
5
|
+
dryRun: boolean;
|
|
6
|
+
}) => Promise<{
|
|
7
|
+
publisherAddress: string;
|
|
8
|
+
}>;
|
|
9
|
+
//# sourceMappingURL=publisher.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"publisher.d.ts","sourceRoot":"","sources":["../../../../src/commands/create/publisher.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,OAAO,EAER,MAAM,iBAAiB,CAAC;AA6CzB,eAAO,MAAM,sBAAsB;YAKzB,OAAO;SACV,MAAM;YACH,OAAO;;;EAmBhB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Keypair } from "@solana/web3.js";
|
|
2
|
+
declare type CreateReleaseCommandInput = {
|
|
3
|
+
appMintAddress: string;
|
|
4
|
+
version: string;
|
|
5
|
+
buildToolsPath: string;
|
|
6
|
+
signer: Keypair;
|
|
7
|
+
url: string;
|
|
8
|
+
dryRun?: boolean;
|
|
9
|
+
};
|
|
10
|
+
export declare const createReleaseCommand: ({ appMintAddress, version, buildToolsPath, signer, url, dryRun, }: CreateReleaseCommandInput) => Promise<{
|
|
11
|
+
releaseAddress: string;
|
|
12
|
+
} | undefined>;
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=release.d.ts.map
|
|
@@ -0,0 +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,aAAK,yBAAyB,GAAG;IAC/B,cAAc,EAAE,MAAM,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,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,sEAO9B,yBAAyB;;cAwB3B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/commands/publish/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Keypair } from "@solana/web3.js";
|
|
2
|
+
declare type PublishRemoveCommandInput = {
|
|
3
|
+
releaseMintAddress: string;
|
|
4
|
+
signer: Keypair;
|
|
5
|
+
url: string;
|
|
6
|
+
dryRun: boolean;
|
|
7
|
+
requestorIsAuthorized: boolean;
|
|
8
|
+
critical: boolean;
|
|
9
|
+
};
|
|
10
|
+
export declare const publishRemoveCommand: ({ releaseMintAddress, signer, url, dryRun, requestorIsAuthorized, critical, }: PublishRemoveCommandInput) => Promise<void>;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=remove.d.ts.map
|
|
@@ -0,0 +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,aAAK,yBAAyB,GAAG;IAC/B,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,kFAO9B,yBAAyB,kBAuB3B,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Keypair } from "@solana/web3.js";
|
|
2
|
+
declare type PublishSubmitCommandInput = {
|
|
3
|
+
releaseMintAddress: string;
|
|
4
|
+
signer: Keypair;
|
|
5
|
+
url: string;
|
|
6
|
+
dryRun: boolean;
|
|
7
|
+
compliesWithSolanaDappStorePolicies: boolean;
|
|
8
|
+
requestorIsAuthorized: boolean;
|
|
9
|
+
};
|
|
10
|
+
export declare const publishSubmitCommand: ({ releaseMintAddress, signer, url, dryRun, compliesWithSolanaDappStorePolicies, requestorIsAuthorized, }: PublishSubmitCommandInput) => Promise<void>;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=submit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"submit.d.ts","sourceRoot":"","sources":["../../../../src/commands/publish/submit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAMtD,aAAK,yBAAyB,GAAG;IAC/B,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,6GAO9B,yBAAyB,kBAgC3B,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Keypair } from "@solana/web3.js";
|
|
2
|
+
declare type PublishSupportCommandInput = {
|
|
3
|
+
releaseMintAddress: string;
|
|
4
|
+
signer: Keypair;
|
|
5
|
+
url: string;
|
|
6
|
+
dryRun: boolean;
|
|
7
|
+
requestorIsAuthorized: boolean;
|
|
8
|
+
requestDetails: string;
|
|
9
|
+
};
|
|
10
|
+
export declare const publishSupportCommand: ({ releaseMintAddress, signer, url, dryRun, requestorIsAuthorized, requestDetails, }: PublishSupportCommandInput) => Promise<void>;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=support.d.ts.map
|
|
@@ -0,0 +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,aAAK,0BAA0B,GAAG;IAChC,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,wFAO/B,0BAA0B,kBAuB5B,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Keypair } from "@solana/web3.js";
|
|
2
|
+
declare type PublishUpdateCommandInput = {
|
|
3
|
+
releaseMintAddress: string;
|
|
4
|
+
signer: Keypair;
|
|
5
|
+
url: string;
|
|
6
|
+
dryRun: boolean;
|
|
7
|
+
compliesWithSolanaDappStorePolicies: boolean;
|
|
8
|
+
requestorIsAuthorized: boolean;
|
|
9
|
+
critical: boolean;
|
|
10
|
+
};
|
|
11
|
+
export declare const publishUpdateCommand: ({ releaseMintAddress, signer, url, dryRun, compliesWithSolanaDappStorePolicies, requestorIsAuthorized, critical, }: PublishUpdateCommandInput) => Promise<void>;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=update.d.ts.map
|
|
@@ -0,0 +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,aAAK,yBAAyB,GAAG;IAC/B,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,uHAQ9B,yBAAyB,kBAiC3B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../../src/commands/validate.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAG/C,eAAO,MAAM,eAAe;YAIlB,OAAO;;mBAiDhB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { App, Publisher, Release, SolanaMobileDappPublisherPortal } from "@solana-mobile/dapp-store-publishing-tools";
|
|
2
|
+
export interface CLIConfig {
|
|
3
|
+
publisher: Publisher;
|
|
4
|
+
app: App;
|
|
5
|
+
release: Release;
|
|
6
|
+
solana_mobile_dapp_publisher_portal: SolanaMobileDappPublisherPortal;
|
|
7
|
+
isValid: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare const getConfig: (configPath: string) => Promise<CLIConfig>;
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +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;IACrE,OAAO,EAAE,OAAO,CAAC;CAClB;AAKD,eAAO,MAAM,SAAS,eAAsB,MAAM,uBAajD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { MetaplexFile, StorageDriver } from "@metaplex-foundation/js";
|
|
2
|
+
declare type URI = string;
|
|
3
|
+
declare type Asset = {
|
|
4
|
+
path: string;
|
|
5
|
+
sha256: string;
|
|
6
|
+
uri: URI;
|
|
7
|
+
};
|
|
8
|
+
export declare type AssetManifestSchema = {
|
|
9
|
+
schema_version: string;
|
|
10
|
+
assets: {
|
|
11
|
+
[path: string]: Asset;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
export declare class CachedStorageDriver implements StorageDriver {
|
|
15
|
+
static readonly SCHEMA_VERSION = "0.2.2";
|
|
16
|
+
assetManifest: AssetManifestSchema;
|
|
17
|
+
assetManifestPath: string;
|
|
18
|
+
storageDriver: StorageDriver;
|
|
19
|
+
constructor(storageDriver: StorageDriver, { assetManifestPath }: {
|
|
20
|
+
assetManifestPath: string;
|
|
21
|
+
});
|
|
22
|
+
getUploadPrice(bytes: number): Promise<import("@metaplex-foundation/js").Amount<import("@metaplex-foundation/js").Currency>>;
|
|
23
|
+
loadAssetManifest(filename: string): AssetManifestSchema | undefined;
|
|
24
|
+
uploadedAsset(filename: string, { sha256 }: {
|
|
25
|
+
sha256: string;
|
|
26
|
+
}): Asset | null;
|
|
27
|
+
upload(file: MetaplexFile): Promise<string>;
|
|
28
|
+
}
|
|
29
|
+
export {};
|
|
30
|
+
//# sourceMappingURL=CachedStorageDriver.d.ts.map
|
|
@@ -0,0 +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,aAAK,GAAG,GAAG,MAAM,CAAC;AAElB,aAAK,KAAK,GAAG;IACX,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,GAAG,CAAC;CACV,CAAC;AAEF,oBAAY,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;IACvD,MAAM,CAAC,QAAQ,CAAC,cAAc,WAAW;IACzC,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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/upload/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { App, Publisher, Release } from "@solana-mobile/dapp-store-publishing-tools";
|
|
2
|
+
import type { Connection } from "@solana/web3.js";
|
|
3
|
+
import { Keypair } from "@solana/web3.js";
|
|
4
|
+
import type { CLIConfig } from "./config/index.js";
|
|
5
|
+
import debugModule from "debug";
|
|
6
|
+
import { Metaplex } from "@metaplex-foundation/js";
|
|
7
|
+
export declare const debug: debugModule.Debugger;
|
|
8
|
+
export declare const parseKeypair: (pathToKeypairFile: string) => Keypair | undefined;
|
|
9
|
+
export declare const getConfigFile: (buildToolsDir?: string | null) => Promise<CLIConfig & {
|
|
10
|
+
isValid: boolean;
|
|
11
|
+
}>;
|
|
12
|
+
export declare const showUserErrorMessage: (msg: string) => void;
|
|
13
|
+
declare type SaveToConfigArgs = {
|
|
14
|
+
publisher?: Pick<Publisher, "address">;
|
|
15
|
+
app?: Pick<App, "address">;
|
|
16
|
+
release?: Pick<Release, "address" | "version">;
|
|
17
|
+
};
|
|
18
|
+
export declare const saveToConfig: ({ publisher, app, release, }: SaveToConfigArgs) => Promise<void>;
|
|
19
|
+
export declare const getMetaplexInstance: (connection: Connection, keypair: Keypair) => Metaplex;
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAEV,GAAG,EACH,SAAS,EACT,OAAO,EACR,MAAM,4CAA4C,CAAC;AACpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAEnD,OAAO,WAAW,MAAM,OAAO,CAAC;AAKhC,OAAO,EAGL,QAAQ,EAET,MAAM,yBAAyB,CAAC;AAQjC,eAAO,MAAM,KAAK,sBAAqB,CAAC;AAExC,eAAO,MAAM,YAAY,sBAAuB,MAAM,wBASrD,CAAC;AAaF,eAAO,MAAM,aAAa,mBACT,MAAM,GAAG,IAAI,KAC3B,QAAQ,SAAS,GAAG;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,CA6F1C,CAAC;AAYF,eAAO,MAAM,oBAAoB,QAAS,MAAM,SAI/C,CAAC;AAoDF,aAAK,gBAAgB,GAAG;IACtB,SAAS,CAAC,EAAE,IAAI,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;IACvC,GAAG,CAAC,EAAE,IAAI,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;IAC3B,OAAO,CAAC,EAAE,IAAI,CAAC,OAAO,EAAE,SAAS,GAAG,SAAS,CAAC,CAAC;CAChD,CAAC;AAEF,eAAO,MAAM,YAAY,iCAItB,gBAAgB,kBA2BlB,CAAC;AAEF,eAAO,MAAM,mBAAmB,eAClB,UAAU,WACb,OAAO,aAiBjB,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@solana-mobile/dapp-store-cli",
|
|
3
|
+
"version": "0.1.1-0",
|
|
4
|
+
"license": "Apache-2.0",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"sideEffects": false,
|
|
7
|
+
"main": "./lib/cjs/index.js",
|
|
8
|
+
"module": "./lib/esm/index.js",
|
|
9
|
+
"types": "./lib/types/index.d.ts",
|
|
10
|
+
"exports": {
|
|
11
|
+
"import": "./lib/esm/index.js",
|
|
12
|
+
"require": "./lib/cjs/index.js",
|
|
13
|
+
"types": "./lib/types/index.d.ts"
|
|
14
|
+
},
|
|
15
|
+
"bin": {
|
|
16
|
+
"dapp-store": "./bin/dapp-store.js"
|
|
17
|
+
},
|
|
18
|
+
"files": [
|
|
19
|
+
"lib",
|
|
20
|
+
"src",
|
|
21
|
+
"LICENSE"
|
|
22
|
+
],
|
|
23
|
+
"publishConfig": {
|
|
24
|
+
"access": "public"
|
|
25
|
+
},
|
|
26
|
+
"devDependencies": {
|
|
27
|
+
"@metaplex-foundation/js": "^0.17.1",
|
|
28
|
+
"@types/commander": "^2.12.2",
|
|
29
|
+
"@types/debug": "^4.1.7",
|
|
30
|
+
"@types/js-yaml": "^4.0.5",
|
|
31
|
+
"shx": "^0.3.4"
|
|
32
|
+
},
|
|
33
|
+
"dependencies": {
|
|
34
|
+
"@solana-mobile/dapp-store-publishing-tools": "^0.1.0",
|
|
35
|
+
"@solana/web3.js": "1.68.0",
|
|
36
|
+
"ajv": "^8.11.0",
|
|
37
|
+
"commander": "^9.4.1",
|
|
38
|
+
"debug": "^4.3.4",
|
|
39
|
+
"dotenv": "^16.0.3",
|
|
40
|
+
"esm": "^3.2.25",
|
|
41
|
+
"image-size": "^1.0.2",
|
|
42
|
+
"js-yaml": "^4.1.0",
|
|
43
|
+
"tweetnacl": "1.0.3"
|
|
44
|
+
},
|
|
45
|
+
"scripts": {
|
|
46
|
+
"clean": "shx mkdir -p lib && shx rm -rf lib",
|
|
47
|
+
"prebuild": "pnpm run clean"
|
|
48
|
+
}
|
|
49
|
+
}
|