@solana-mobile/dapp-store-cli 0.3.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/esm/CliUtils.js +105 -0
- package/lib/esm/CliUtils.js.map +1 -0
- package/lib/esm/commands/{validate.js → ValidateCommand.js} +4 -3
- package/lib/esm/commands/ValidateCommand.js.map +1 -0
- package/lib/esm/commands/create/{app.js → CreateCliApp.js} +10 -7
- package/lib/esm/commands/create/CreateCliApp.js.map +1 -0
- package/lib/esm/commands/create/{publisher.js → CreateCliPublisher.js} +10 -7
- package/lib/esm/commands/create/CreateCliPublisher.js.map +1 -0
- package/lib/esm/commands/create/{release.js → CreateCliRelease.js} +10 -7
- package/lib/esm/commands/create/CreateCliRelease.js.map +1 -0
- package/lib/esm/commands/create/index.js +3 -3
- package/lib/esm/commands/create/index.js.map +1 -1
- package/lib/esm/commands/index.js +1 -1
- package/lib/esm/commands/index.js.map +1 -1
- package/lib/esm/commands/publish/{remove.js → PublishCliRemove.js} +4 -3
- package/lib/esm/commands/publish/PublishCliRemove.js.map +1 -0
- package/lib/esm/commands/publish/{submit.js → PublishCliSubmit.js} +4 -3
- package/lib/esm/commands/publish/PublishCliSubmit.js.map +1 -0
- package/lib/esm/commands/publish/{support.js → PublishCliSupport.js} +4 -3
- package/lib/esm/commands/publish/PublishCliSupport.js.map +1 -0
- package/lib/esm/commands/publish/{update.js → PublishCliUpdate.js} +4 -3
- package/lib/esm/commands/publish/PublishCliUpdate.js.map +1 -0
- package/lib/esm/commands/publish/index.js +4 -4
- package/lib/esm/commands/publish/index.js.map +1 -1
- package/lib/esm/commands/scaffolding/{init.js → ScaffoldInit.js} +2 -2
- package/lib/esm/commands/scaffolding/ScaffoldInit.js.map +1 -0
- package/lib/esm/commands/scaffolding/index.js +1 -1
- package/lib/esm/commands/scaffolding/index.js.map +1 -1
- package/lib/esm/config/PublishDetails.js +178 -0
- package/lib/esm/config/PublishDetails.js.map +1 -0
- package/lib/esm/generated/config_obj.json +1 -1
- package/lib/esm/index.js +16 -16
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/package.json +2 -2
- package/lib/types/{utils.d.ts → CliUtils.d.ts} +2 -11
- package/lib/types/CliUtils.d.ts.map +1 -0
- package/lib/types/commands/{validate.d.ts → ValidateCommand.d.ts} +1 -1
- package/lib/types/commands/ValidateCommand.d.ts.map +1 -0
- package/lib/types/commands/create/{app.d.ts → CreateCliApp.d.ts} +2 -2
- package/lib/types/commands/create/CreateCliApp.d.ts.map +1 -0
- package/lib/types/commands/create/{publisher.d.ts → CreateCliPublisher.d.ts} +1 -1
- package/lib/types/commands/create/CreateCliPublisher.d.ts.map +1 -0
- package/lib/types/commands/create/{release.d.ts → CreateCliRelease.d.ts} +2 -2
- package/lib/types/commands/create/CreateCliRelease.d.ts.map +1 -0
- package/lib/types/commands/create/index.d.ts +3 -3
- package/lib/types/commands/create/index.d.ts.map +1 -1
- package/lib/types/commands/index.d.ts +1 -1
- package/lib/types/commands/index.d.ts.map +1 -1
- package/lib/types/commands/publish/{remove.d.ts → PublishCliRemove.d.ts} +2 -2
- package/lib/types/commands/publish/PublishCliRemove.d.ts.map +1 -0
- package/lib/types/commands/publish/{submit.d.ts → PublishCliSubmit.d.ts} +2 -2
- package/lib/types/commands/publish/PublishCliSubmit.d.ts.map +1 -0
- package/lib/types/commands/publish/{support.d.ts → PublishCliSupport.d.ts} +2 -2
- package/lib/types/commands/publish/PublishCliSupport.d.ts.map +1 -0
- package/lib/types/commands/publish/{update.d.ts → PublishCliUpdate.d.ts} +2 -2
- package/lib/types/commands/publish/PublishCliUpdate.d.ts.map +1 -0
- package/lib/types/commands/publish/index.d.ts +4 -4
- package/lib/types/commands/publish/index.d.ts.map +1 -1
- package/lib/types/commands/scaffolding/{init.d.ts → ScaffoldInit.d.ts} +1 -1
- package/lib/types/commands/scaffolding/ScaffoldInit.d.ts.map +1 -0
- package/lib/types/commands/scaffolding/index.d.ts +1 -1
- package/lib/types/commands/scaffolding/index.d.ts.map +1 -1
- package/lib/types/config/PublishDetails.d.ts +17 -0
- package/lib/types/config/PublishDetails.d.ts.map +1 -0
- package/lib/types/upload/CachedStorageDriver.d.ts +3 -3
- package/lib/types/upload/CachedStorageDriver.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/CliUtils.ts +135 -0
- package/src/commands/{validate.ts → ValidateCommand.ts} +3 -2
- package/src/commands/create/{app.ts → CreateCliApp.ts} +9 -8
- package/src/commands/create/{publisher.ts → CreateCliPublisher.ts} +9 -8
- package/src/commands/create/{release.ts → CreateCliRelease.ts} +9 -10
- package/src/commands/create/index.ts +3 -3
- package/src/commands/index.ts +1 -1
- package/src/commands/publish/{remove.ts → PublishCliRemove.ts} +3 -2
- package/src/commands/publish/{submit.ts → PublishCliSubmit.ts} +3 -2
- package/src/commands/publish/{support.ts → PublishCliSupport.ts} +3 -2
- package/src/commands/publish/{update.ts → PublishCliUpdate.ts} +3 -2
- package/src/commands/publish/index.ts +4 -4
- package/src/commands/scaffolding/{init.ts → ScaffoldInit.ts} +1 -1
- package/src/commands/scaffolding/index.ts +1 -1
- package/src/config/PublishDetails.ts +273 -0
- package/src/index.ts +18 -18
- package/src/prebuild_schema/publishing_source.yaml +6 -6
- package/README.md +0 -86
- package/lib/esm/commands/create/app.js.map +0 -1
- package/lib/esm/commands/create/publisher.js.map +0 -1
- package/lib/esm/commands/create/release.js.map +0 -1
- package/lib/esm/commands/publish/remove.js.map +0 -1
- package/lib/esm/commands/publish/submit.js.map +0 -1
- package/lib/esm/commands/publish/support.js.map +0 -1
- package/lib/esm/commands/publish/update.js.map +0 -1
- package/lib/esm/commands/scaffolding/init.js.map +0 -1
- package/lib/esm/commands/validate.js.map +0 -1
- package/lib/esm/config/index.js +0 -18
- package/lib/esm/config/index.js.map +0 -1
- package/lib/esm/utils.js +0 -238
- package/lib/esm/utils.js.map +0 -1
- package/lib/types/commands/create/app.d.ts.map +0 -1
- package/lib/types/commands/create/publisher.d.ts.map +0 -1
- package/lib/types/commands/create/release.d.ts.map +0 -1
- package/lib/types/commands/publish/remove.d.ts.map +0 -1
- package/lib/types/commands/publish/submit.d.ts.map +0 -1
- package/lib/types/commands/publish/support.d.ts.map +0 -1
- package/lib/types/commands/publish/update.d.ts.map +0 -1
- package/lib/types/commands/scaffolding/init.d.ts.map +0 -1
- package/lib/types/commands/validate.d.ts.map +0 -1
- package/lib/types/config/index.d.ts +0 -9
- package/lib/types/config/index.d.ts.map +0 -1
- package/lib/types/utils.d.ts.map +0 -1
- package/src/config/index.ts +0 -38
- package/src/generated/config_obj.json +0 -1
- package/src/generated/config_schema.json +0 -1
- package/src/utils.ts +0 -342
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import { dump, load } from "js-yaml";
|
|
2
|
+
import Ajv from "ajv";
|
|
3
|
+
// eslint-disable-next-line require-extensions/require-extensions
|
|
4
|
+
import schemaJson from "../generated/config_schema.json" assert { type: "json" };
|
|
5
|
+
import fs from "fs";
|
|
6
|
+
import path from "path";
|
|
7
|
+
import { toMetaplexFile } from "@metaplex-foundation/js";
|
|
8
|
+
import { Constants, showMessage } from "../CliUtils.js";
|
|
9
|
+
import util from "util";
|
|
10
|
+
import { imageSize } from "image-size";
|
|
11
|
+
import { exec } from "child_process";
|
|
12
|
+
const runImgSize = util.promisify(imageSize);
|
|
13
|
+
const runExec = util.promisify(exec);
|
|
14
|
+
const AaptPrefixes = {
|
|
15
|
+
quoteRegex: "'(.*?)'",
|
|
16
|
+
quoteNonLazyRegex: "'(.*)'",
|
|
17
|
+
packagePrefix: "package: name=",
|
|
18
|
+
verCodePrefix: "versionCode=",
|
|
19
|
+
verNamePrefix: "versionName=",
|
|
20
|
+
sdkPrefix: "sdkVersion:",
|
|
21
|
+
localePrefix: "locales: ",
|
|
22
|
+
};
|
|
23
|
+
const ajv = new Ajv({ strictTuples: false });
|
|
24
|
+
const validate = ajv.compile(schemaJson);
|
|
25
|
+
export const loadPublishDetails = async (configPath) => {
|
|
26
|
+
const configFile = await fs.promises.readFile(configPath, "utf-8");
|
|
27
|
+
const valid = validate(load(configFile));
|
|
28
|
+
if (!valid) {
|
|
29
|
+
console.error(validate.errors);
|
|
30
|
+
process.exit(1);
|
|
31
|
+
}
|
|
32
|
+
return load(configFile);
|
|
33
|
+
};
|
|
34
|
+
export const loadPublishDetailsWithChecks = async (buildToolsDir = null) => {
|
|
35
|
+
const configFilePath = `${process.cwd()}/${Constants.CONFIG_FILE_NAME}`;
|
|
36
|
+
const config = await loadPublishDetails(configFilePath);
|
|
37
|
+
// We validate that the config is going to have at least one installable asset
|
|
38
|
+
const apkEntry = config.release.files.find((asset) => asset.purpose === "install");
|
|
39
|
+
const apkPath = path.join(process.cwd(), apkEntry?.uri);
|
|
40
|
+
if (!fs.existsSync(apkPath)) {
|
|
41
|
+
throw new Error("Invalid path to APK file.");
|
|
42
|
+
}
|
|
43
|
+
if (buildToolsDir) {
|
|
44
|
+
config.release.android_details = await getAndroidDetails(buildToolsDir, apkPath);
|
|
45
|
+
}
|
|
46
|
+
const publisherIcon = config.publisher.media?.find((asset) => asset.purpose === "icon")?.uri;
|
|
47
|
+
if (publisherIcon) {
|
|
48
|
+
const iconPath = path.join(process.cwd(), publisherIcon);
|
|
49
|
+
await checkIconCompatibility(iconPath, "Publisher");
|
|
50
|
+
const iconBuffer = await fs.promises.readFile(iconPath);
|
|
51
|
+
config.publisher.icon = toMetaplexFile(iconBuffer, publisherIcon);
|
|
52
|
+
}
|
|
53
|
+
const appIcon = config.app.media?.find((asset) => asset.purpose === "icon")?.uri;
|
|
54
|
+
if (appIcon) {
|
|
55
|
+
const iconPath = path.join(process.cwd(), appIcon);
|
|
56
|
+
await checkIconCompatibility(iconPath, "App");
|
|
57
|
+
const iconBuffer = await fs.promises.readFile(iconPath);
|
|
58
|
+
config.app.icon = toMetaplexFile(iconBuffer, appIcon);
|
|
59
|
+
}
|
|
60
|
+
const releaseIcon = config.release.media?.find((asset) => asset.purpose === "icon")?.uri;
|
|
61
|
+
if (releaseIcon) {
|
|
62
|
+
const iconPath = path.join(process.cwd(), releaseIcon);
|
|
63
|
+
await checkIconCompatibility(iconPath, "Release");
|
|
64
|
+
}
|
|
65
|
+
if (!appIcon && !releaseIcon) {
|
|
66
|
+
throw new Error("Please specify at least one media entry of type icon in your configuration file");
|
|
67
|
+
}
|
|
68
|
+
config.release.media.forEach((item) => {
|
|
69
|
+
const imagePath = path.join(process.cwd(), item.uri);
|
|
70
|
+
if (!fs.existsSync(imagePath) || !checkImageExtension(imagePath)) {
|
|
71
|
+
throw new Error(`Invalid media path or file type: ${item.uri}. Please ensure the file is a jpeg, png, or webp file.`);
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
validateLocalizableResources(config);
|
|
75
|
+
const googlePkg = config.solana_mobile_dapp_publisher_portal.google_store_package;
|
|
76
|
+
if (googlePkg?.length) {
|
|
77
|
+
const pkgCompare = new RegExp("[a-zA-Z0-9_]+(\\.[a-zA-Z0-9_]+)+").exec(googlePkg);
|
|
78
|
+
if (!pkgCompare?.length) {
|
|
79
|
+
throw new Error("Please provide a valid Google store package name in the Publisher Portal section of your configuration file.");
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
return config;
|
|
83
|
+
};
|
|
84
|
+
const checkIconCompatibility = async (path, typeString) => {
|
|
85
|
+
if (!fs.existsSync(path) || !checkImageExtension(path)) {
|
|
86
|
+
throw new Error(`Please check the path to your ${typeString} icon and ensure the file is a jpeg, png, or webp file.`);
|
|
87
|
+
}
|
|
88
|
+
if (await checkIconDimensions(path)) {
|
|
89
|
+
throw new Error("Icons must have square dimensions and be no greater than 512px by 512px.");
|
|
90
|
+
}
|
|
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
|
+
/**
|
|
100
|
+
* We need to pre-check some things in the localized resources before we move forward
|
|
101
|
+
*/
|
|
102
|
+
const validateLocalizableResources = (config) => {
|
|
103
|
+
if (!config.release.catalog["en-US"]) {
|
|
104
|
+
throw new Error("Please ensure you have the en-US locale strings in your configuration file.");
|
|
105
|
+
}
|
|
106
|
+
const baselineSize = Object.keys(config.release.catalog["en-US"]).length;
|
|
107
|
+
Object.keys(config.release.catalog).forEach((locale) => {
|
|
108
|
+
const size = Object.keys(config.release.catalog[locale]).length;
|
|
109
|
+
if (size != baselineSize) {
|
|
110
|
+
throw new Error("Please ensure you have included all localized strings for all locales in your configuration file.");
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
const descsWrongLength = Object.values(config.release.catalog)
|
|
114
|
+
.map((x) => x.short_description)
|
|
115
|
+
.filter((desc) => !desc?.length || desc.length > 50);
|
|
116
|
+
if (descsWrongLength.length > 0) {
|
|
117
|
+
throw new Error("Please ensure all translations of short_description are between 0 and 50 characters");
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
const checkIconDimensions = async (iconPath) => {
|
|
121
|
+
const size = await runImgSize(iconPath);
|
|
122
|
+
return size?.width != size?.height || (size?.width ?? 0) > 512;
|
|
123
|
+
};
|
|
124
|
+
const getAndroidDetails = async (aaptDir, apkPath) => {
|
|
125
|
+
try {
|
|
126
|
+
const { stdout } = await runExec(`${aaptDir}/aapt2 dump badging "${apkPath}"`);
|
|
127
|
+
const appPackage = new RegExp(AaptPrefixes.packagePrefix + AaptPrefixes.quoteRegex).exec(stdout);
|
|
128
|
+
const versionCode = new RegExp(AaptPrefixes.verCodePrefix + AaptPrefixes.quoteRegex).exec(stdout);
|
|
129
|
+
const versionName = new RegExp(AaptPrefixes.verNamePrefix + AaptPrefixes.quoteRegex).exec(stdout);
|
|
130
|
+
const minSdk = new RegExp(AaptPrefixes.sdkPrefix + AaptPrefixes.quoteRegex).exec(stdout);
|
|
131
|
+
const permissions = [...stdout.matchAll(/uses-permission: name='(.*)'/g)];
|
|
132
|
+
const locales = new RegExp(AaptPrefixes.localePrefix + AaptPrefixes.quoteNonLazyRegex).exec(stdout);
|
|
133
|
+
let localeArray = Array.from(locales?.values() ?? []);
|
|
134
|
+
if (localeArray.length == 2) {
|
|
135
|
+
const localesSrc = localeArray[1];
|
|
136
|
+
localeArray = ["en-US"].concat(localesSrc.split("' '").slice(1));
|
|
137
|
+
}
|
|
138
|
+
if (localeArray.length >= 60) {
|
|
139
|
+
showMessage("The bundle apk claims supports for following locales", "Claim for supported locales::\n" +
|
|
140
|
+
localeArray +
|
|
141
|
+
"\nIf this release does not support all these locales the release may be rejected" +
|
|
142
|
+
"\nSee details at https://developer.android.com/guide/topics/resources/multilingual-support#design for configuring the supported locales", "warning");
|
|
143
|
+
}
|
|
144
|
+
return {
|
|
145
|
+
android_package: appPackage?.[1] ?? "",
|
|
146
|
+
min_sdk: parseInt(minSdk?.[1] ?? "0", 10),
|
|
147
|
+
version_code: parseInt(versionCode?.[1] ?? "0", 10),
|
|
148
|
+
version: versionName?.[1] ?? "0",
|
|
149
|
+
permissions: permissions.flatMap(permission => permission[1]),
|
|
150
|
+
locales: localeArray
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
catch (e) {
|
|
154
|
+
throw new Error("There was an error parsing your APK. Please ensure you have provided a valid Android tools directory containing AAPT2.");
|
|
155
|
+
}
|
|
156
|
+
};
|
|
157
|
+
export const writeToPublishDetails = async ({ publisher, app, release }) => {
|
|
158
|
+
const currentConfig = await loadPublishDetailsWithChecks();
|
|
159
|
+
delete currentConfig.publisher.icon;
|
|
160
|
+
delete currentConfig.app.icon;
|
|
161
|
+
const newConfig = {
|
|
162
|
+
publisher: {
|
|
163
|
+
...currentConfig.publisher,
|
|
164
|
+
address: publisher?.address ?? currentConfig.publisher.address
|
|
165
|
+
},
|
|
166
|
+
app: {
|
|
167
|
+
...currentConfig.app,
|
|
168
|
+
address: app?.address ?? currentConfig.app.address
|
|
169
|
+
},
|
|
170
|
+
release: {
|
|
171
|
+
...currentConfig.release,
|
|
172
|
+
address: release?.address ?? currentConfig.release.address
|
|
173
|
+
},
|
|
174
|
+
solana_mobile_dapp_publisher_portal: currentConfig.solana_mobile_dapp_publisher_portal
|
|
175
|
+
};
|
|
176
|
+
fs.writeFileSync(`${process.cwd()}/${Constants.CONFIG_FILE_NAME}`, dump(newConfig));
|
|
177
|
+
};
|
|
178
|
+
//# sourceMappingURL=PublishDetails.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PublishDetails.js","sourceRoot":"","sources":["../../../src/config/PublishDetails.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,iEAAiE;AACjE,OAAO,UAAU,MAAM,iCAAiC,CAAC,SAAS,IAAI,EAAE,MAAM,EAAE,CAAC;AACjF,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAErC,MAAM,UAAU,GAAG,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;AAC7C,MAAM,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;AASrC,MAAM,YAAY,GAAG;IACnB,UAAU,EAAE,SAAS;IACrB,iBAAiB,EAAE,QAAQ;IAC3B,aAAa,EAAE,gBAAgB;IAC/B,aAAa,EAAE,cAAc;IAC7B,aAAa,EAAE,cAAc;IAC7B,SAAS,EAAE,aAAa;IACxB,Y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D,OAAO,EAAE,WAAW;SACrB,CAAC;KACH;IAAC,OAAO,CAAC,EAAE;QACV,MAAM,IAAI,KAAK,CAAC,wHAAwH,CAAC,CAAC;KAC3I;AACH,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAG,KAAK,EAAE,EAAE,SAAS,EAAE,GAAG,EAAE,OAAO,EAAoB,EAAE,EAAE;IAC3F,MAAM,aAAa,GAAG,MAAM,4BAA4B,EAAE,CAAC;IAE3D,OAAO,aAAa,CAAC,SAAS,CAAC,IAAI,CAAC;IACpC,OAAO,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC;IAE9B,MAAM,SAAS,GAAmB;QAChC,SAAS,EAAE;YACT,GAAG,aAAa,CAAC,SAAS;YAC1B,OAAO,EAAE,SAAS,EAAE,OAAO,IAAI,aAAa,CAAC,SAAS,CAAC,OAAO;SAC/D;QACD,GAAG,EAAE;YACH,GAAG,aAAa,CAAC,GAAG;YACpB,OAAO,EAAE,GAAG,EAAE,OAAO,IAAI,aAAa,CAAC,GAAG,CAAC,OAAO;SACnD;QACD,OAAO,EAAE;YACP,GAAG,aAAa,CAAC,OAAO;YACxB,OAAO,EAAE,OAAO,EAAE,OAAO,IAAI,aAAa,CAAC,OAAO,CAAC,OAAO;SAC3D;QACD,mCAAmC,EAAE,aAAa,CAAC,mCAAmC;KACvF,CAAC;IAEF,EAAE,CAAC,aAAa,CAAC,GAAG,OAAO,CAAC,GAAG,EAAE,IAAI,SAAS,CAAC,gBAAgB,EAAE,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC;AACtF,CAAC,CAAC"}
|
|
@@ -1 +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
|
|
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>>", "short_description": "<<SHORT_APP_DESCRIPTION>>", "long_description": "<<LONG_APP_DESCRIPTION>>", "new_in_version": "<<WHATS_NEW_IN_THIS_VERSION>>", "saga_features": "<<ANY_FEATURES_ONLY_AVAILBLE_WHEN_RUNNING_ON_SAGA>>" } } }, "solana_mobile_dapp_publisher_portal": { "google_store_package": "<<ANDROID_PACKAGE_NAME_OF_GOOGLE_PLAY_STORE_VERSION_IF_DIFFERENT>>", "testing_instructions": "<<TESTING_INSTRUCTIONS>>" } }
|
package/lib/esm/index.js
CHANGED
|
@@ -2,9 +2,10 @@ 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, Constants, generateNetworkSuffix,
|
|
5
|
+
import { checkForSelfUpdate, checkSubmissionNetwork, Constants, generateNetworkSuffix, parseKeypair, showMessage } from "./CliUtils.js";
|
|
6
6
|
import * as dotenv from "dotenv";
|
|
7
7
|
import { initScaffold } from "./commands/scaffolding/index.js";
|
|
8
|
+
import { loadPublishDetailsWithChecks } from "./config/PublishDetails.js";
|
|
8
9
|
dotenv.config();
|
|
9
10
|
const hasAddressInConfig = ({ address }) => {
|
|
10
11
|
return !!address;
|
|
@@ -26,8 +27,7 @@ function resolveBuildToolsPath(buildToolsPath) {
|
|
|
26
27
|
* 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
|
*/
|
|
28
29
|
function latestReleaseMessage() {
|
|
29
|
-
showMessage(`Publishing Tools Version ${Constants.CLI_VERSION}`, "-
|
|
30
|
-
"- You can now specify a release-specific icon in the release \`media\` section in your configuration file.", "warning");
|
|
30
|
+
showMessage(`Publishing Tools Version ${Constants.CLI_VERSION}`, "- NOTE: In a future release, the maximum length for `short_description` will be reduced from 50 to 30 characters. We recommend updating all localized instances now.", "warning");
|
|
31
31
|
}
|
|
32
32
|
async function tryWithErrorMessage(block) {
|
|
33
33
|
try {
|
|
@@ -59,7 +59,7 @@ async function main() {
|
|
|
59
59
|
.command("publisher")
|
|
60
60
|
.description("Create a publisher")
|
|
61
61
|
.requiredOption("-k, --keypair <path-to-keypair-file>", "Path to keypair file")
|
|
62
|
-
.option("-u, --url <url>", "RPC URL",
|
|
62
|
+
.option("-u, --url <url>", "RPC URL", Constants.DEFAULT_RPC_DEVNET)
|
|
63
63
|
.option("-d, --dry-run", "Flag for dry run. Doesn't mint an NFT")
|
|
64
64
|
.action(async ({ keypair, url, dryRun }) => {
|
|
65
65
|
tryWithErrorMessage(async () => {
|
|
@@ -79,13 +79,13 @@ async function main() {
|
|
|
79
79
|
.description("Create a app")
|
|
80
80
|
.requiredOption("-k, --keypair <path-to-keypair-file>", "Path to keypair file")
|
|
81
81
|
.option("-p, --publisher-mint-address <publisher-mint-address>", "The mint address of the publisher NFT")
|
|
82
|
-
.option("-u, --url <url>", "RPC URL",
|
|
82
|
+
.option("-u, --url <url>", "RPC URL", Constants.DEFAULT_RPC_DEVNET)
|
|
83
83
|
.option("-d, --dry-run", "Flag for dry run. Doesn't mint an NFT")
|
|
84
84
|
.action(async ({ publisherMintAddress, keypair, url, dryRun }) => {
|
|
85
85
|
tryWithErrorMessage(async () => {
|
|
86
86
|
latestReleaseMessage();
|
|
87
87
|
await checkForSelfUpdate();
|
|
88
|
-
const config = await
|
|
88
|
+
const config = await loadPublishDetailsWithChecks();
|
|
89
89
|
if (!hasAddressInConfig(config.publisher) && !publisherMintAddress) {
|
|
90
90
|
throw new Error("Either specify a publisher mint address in the config file or specify as a CLI argument to this command.");
|
|
91
91
|
}
|
|
@@ -108,7 +108,7 @@ async function main() {
|
|
|
108
108
|
.description("Create a release")
|
|
109
109
|
.requiredOption("-k, --keypair <path-to-keypair-file>", "Path to keypair file")
|
|
110
110
|
.option("-a, --app-mint-address <app-mint-address>", "The mint address of the app NFT")
|
|
111
|
-
.option("-u, --url <url>", "RPC URL",
|
|
111
|
+
.option("-u, --url <url>", "RPC URL", Constants.DEFAULT_RPC_DEVNET)
|
|
112
112
|
.option("-d, --dry-run", "Flag for dry run. Doesn't mint an NFT")
|
|
113
113
|
.option("-b, --build-tools-path <build-tools-path>", "Path to Android build tools which contains AAPT2")
|
|
114
114
|
.action(async ({ appMintAddress, keypair, url, dryRun, buildToolsPath }) => {
|
|
@@ -119,7 +119,7 @@ async function main() {
|
|
|
119
119
|
if (resolvedBuildToolsPath === undefined) {
|
|
120
120
|
throw new Error("Please specify an Android build tools directory in the .env file or via the command line argument.");
|
|
121
121
|
}
|
|
122
|
-
const config = await
|
|
122
|
+
const config = await loadPublishDetailsWithChecks();
|
|
123
123
|
if (!hasAddressInConfig(config.app) && !appMintAddress) {
|
|
124
124
|
throw new Error("Either specify an app mint address in the config file or specify as a CLI argument to this command");
|
|
125
125
|
}
|
|
@@ -172,13 +172,13 @@ async function main() {
|
|
|
172
172
|
.requiredOption("--requestor-is-authorized", "An attestation that the party making this Solana dApp publisher portal request is authorized to do so")
|
|
173
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
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.")
|
|
175
|
-
.option("-u, --url <url>", "RPC URL",
|
|
175
|
+
.option("-u, --url <url>", "RPC URL", Constants.DEFAULT_RPC_DEVNET)
|
|
176
176
|
.option("-d, --dry-run", "Flag for dry run. Doesn't submit the request to the publisher portal.")
|
|
177
177
|
.action(async ({ appMintAddress, releaseMintAddress, keypair, url, compliesWithSolanaDappStorePolicies, requestorIsAuthorized, dryRun, }) => {
|
|
178
178
|
tryWithErrorMessage(async () => {
|
|
179
179
|
await checkForSelfUpdate();
|
|
180
180
|
await checkSubmissionNetwork(url);
|
|
181
|
-
const config = await
|
|
181
|
+
const config = await loadPublishDetailsWithChecks();
|
|
182
182
|
if (!hasAddressInConfig(config.release) && !releaseMintAddress) {
|
|
183
183
|
throw new Error("Either specify a release mint address in the config file or specify as a CLI argument to this command.");
|
|
184
184
|
}
|
|
@@ -207,13 +207,13 @@ async function main() {
|
|
|
207
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
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.")
|
|
209
209
|
.option("-c, --critical", "Flag for a critical app update request")
|
|
210
|
-
.option("-u, --url <url>", "RPC URL",
|
|
210
|
+
.option("-u, --url <url>", "RPC URL", Constants.DEFAULT_RPC_DEVNET)
|
|
211
211
|
.option("-d, --dry-run", "Flag for dry run. Doesn't submit the request to the publisher portal.")
|
|
212
212
|
.action(async ({ appMintAddress, releaseMintAddress, keypair, url, compliesWithSolanaDappStorePolicies, requestorIsAuthorized, critical, dryRun, }) => {
|
|
213
213
|
tryWithErrorMessage(async () => {
|
|
214
214
|
await checkForSelfUpdate();
|
|
215
215
|
await checkSubmissionNetwork(url);
|
|
216
|
-
const config = await
|
|
216
|
+
const config = await loadPublishDetailsWithChecks();
|
|
217
217
|
if (!hasAddressInConfig(config.release) && !releaseMintAddress) {
|
|
218
218
|
throw new Error("Either specify a release mint address in the config file or specify as a CLI argument to this command.");
|
|
219
219
|
}
|
|
@@ -242,13 +242,13 @@ async function main() {
|
|
|
242
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
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.")
|
|
244
244
|
.option("-c, --critical", "Flag for a critical app removal request")
|
|
245
|
-
.option("-u, --url <url>", "RPC URL",
|
|
245
|
+
.option("-u, --url <url>", "RPC URL", Constants.DEFAULT_RPC_DEVNET)
|
|
246
246
|
.option("-d, --dry-run", "Flag for dry run. Doesn't submit the request to the publisher portal.")
|
|
247
247
|
.action(async ({ appMintAddress, releaseMintAddress, keypair, url, requestorIsAuthorized, critical, dryRun, }) => {
|
|
248
248
|
tryWithErrorMessage(async () => {
|
|
249
249
|
await checkForSelfUpdate();
|
|
250
250
|
await checkSubmissionNetwork(url);
|
|
251
|
-
const config = await
|
|
251
|
+
const config = await loadPublishDetailsWithChecks();
|
|
252
252
|
if (!hasAddressInConfig(config.release) && !releaseMintAddress) {
|
|
253
253
|
throw new Error("Either specify a release mint address in the config file or specify as a CLI argument to this command.");
|
|
254
254
|
}
|
|
@@ -275,13 +275,13 @@ async function main() {
|
|
|
275
275
|
.requiredOption("--requestor-is-authorized", "An attestation that the party making this Solana dApp publisher portal request is authorized to do so")
|
|
276
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
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.")
|
|
278
|
-
.option("-u, --url <url>", "RPC URL",
|
|
278
|
+
.option("-u, --url <url>", "RPC URL", Constants.DEFAULT_RPC_DEVNET)
|
|
279
279
|
.option("-d, --dry-run", "Flag for dry run. Doesn't submit the request to the publisher portal.")
|
|
280
280
|
.action(async (requestDetails, { appMintAddress, releaseMintAddress, keypair, url, requestorIsAuthorized, dryRun }) => {
|
|
281
281
|
tryWithErrorMessage(async () => {
|
|
282
282
|
await checkForSelfUpdate();
|
|
283
283
|
await checkSubmissionNetwork(url);
|
|
284
|
-
const config = await
|
|
284
|
+
const config = await loadPublishDetailsWithChecks();
|
|
285
285
|
if (!hasAddressInConfig(config.release) && !releaseMintAddress) {
|
|
286
286
|
throw new Error("Either specify a release mint address in the config file or specify as a CLI argument to this command.");
|
|
287
287
|
}
|
package/lib/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,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rC,IAAI,MAAM,EAAE;gBACV,MAAM,qBAAqB,CAAC;oBAC1B,cAAc;oBACd,kBAAkB;oBAClB,MAAM;oBACN,GAAG;oBACH,MAAM;oBACN,qBAAqB;oBACrB,cAAc;iBACf,CAAC,CAAC;gBAEH,MAAM,UAAU,GAAG,mCAAmC,CAAC;gBACvD,WAAW,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;aACpC;QACH,CAAC,CAAC,CAAC;IACL,CAAC,CACF,CAAC;IAEJ,MAAM,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;AACzC,CAAC;AACD,IAAI,EAAE,CAAC"}
|
package/lib/esm/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@solana-mobile/dapp-store-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"shx": "^0.3.4"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@solana-mobile/dapp-store-publishing-tools": "workspace:0.
|
|
43
|
+
"@solana-mobile/dapp-store-publishing-tools": "workspace:0.4.1",
|
|
44
44
|
"@solana/web3.js": "1.68.0",
|
|
45
45
|
"@types/semver": "^7.3.13",
|
|
46
46
|
"ajv": "^8.11.0",
|
|
@@ -1,29 +1,20 @@
|
|
|
1
|
-
import type { App, Publisher, Release } from "@solana-mobile/dapp-store-publishing-tools";
|
|
2
1
|
import type { Connection } from "@solana/web3.js";
|
|
3
2
|
import { Keypair } from "@solana/web3.js";
|
|
4
|
-
import type { CLIConfig } from "./config/index.js";
|
|
5
3
|
import debugModule from "debug";
|
|
6
4
|
import { Metaplex } from "@metaplex-foundation/js";
|
|
7
5
|
export declare class Constants {
|
|
8
6
|
static CLI_VERSION: string;
|
|
9
7
|
static CONFIG_FILE_NAME: string;
|
|
8
|
+
static DEFAULT_RPC_DEVNET: string;
|
|
10
9
|
}
|
|
11
10
|
export declare const debug: debugModule.Debugger;
|
|
12
11
|
export declare const checkForSelfUpdate: () => Promise<void>;
|
|
13
12
|
export declare const checkMintedStatus: (conn: Connection, pubAddr: string, appAddr: string, releaseAddr: string) => Promise<void>;
|
|
14
13
|
export declare const parseKeypair: (pathToKeypairFile: string) => Keypair | undefined;
|
|
15
|
-
export declare const getConfigWithChecks: (buildToolsDir?: string | null) => Promise<CLIConfig>;
|
|
16
14
|
export declare const isDevnet: (rpcUrl: string) => boolean;
|
|
17
15
|
export declare const isTestnet: (rpcUrl: string) => boolean;
|
|
18
16
|
export declare const checkSubmissionNetwork: (rpcUrl: string) => void;
|
|
19
17
|
export declare const generateNetworkSuffix: (rpcUrl: string) => string;
|
|
20
18
|
export declare const showMessage: (titleMessage?: string, contentMessage?: string, type?: "standard" | "error" | "warning") => string;
|
|
21
|
-
type SaveToConfigArgs = {
|
|
22
|
-
publisher?: Pick<Publisher, "address">;
|
|
23
|
-
app?: Pick<App, "address">;
|
|
24
|
-
release?: Pick<Release, "address">;
|
|
25
|
-
};
|
|
26
|
-
export declare const saveToConfig: ({ publisher, app, release, }: SaveToConfigArgs) => Promise<void>;
|
|
27
19
|
export declare const getMetaplexInstance: (connection: Connection, keypair: Keypair) => Metaplex;
|
|
28
|
-
|
|
29
|
-
//# sourceMappingURL=utils.d.ts.map
|
|
20
|
+
//# sourceMappingURL=CliUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CliUtils.d.ts","sourceRoot":"","sources":["../../src/CliUtils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,OAAO,EAAa,MAAM,iBAAiB,CAAC;AACrD,OAAO,WAAW,MAAM,OAAO,CAAC;AAChC,OAAO,EAAwC,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAOzF,qBAAa,SAAS;IACpB,MAAM,CAAC,WAAW,SAAW;IAC7B,MAAM,CAAC,gBAAgB,SAAiB;IACxC,MAAM,CAAC,kBAAkB,SAAmC;CAC7D;AAED,eAAO,MAAM,KAAK,sBAAqB,CAAC;AAExC,eAAO,MAAM,kBAAkB,qBAU9B,CAAC;AAEF,eAAO,MAAM,iBAAiB,SAAgB,UAAU,WAAW,MAAM,WAAW,MAAM,eAAe,MAAM,kBAW9G,CAAC;AAEF,eAAO,MAAM,YAAY,sBAAuB,MAAM,wBAYrD,CAAC;AAEF,eAAO,MAAM,QAAQ,WAAY,MAAM,KAAG,OAEzC,CAAC;AAEF,eAAO,MAAM,SAAS,WAAY,MAAM,KAAG,OAE1C,CAAC;AAEF,eAAO,MAAM,sBAAsB,WAAY,MAAM,SAIpD,CAAC;AAEF,eAAO,MAAM,qBAAqB,WAAY,MAAM,KAAG,MAYtD,CAAC;AAEF,eAAO,MAAM,WAAW,0DAGhB,UAAU,GAAG,OAAO,GAAG,SAAS,KACrC,MAoBF,CAAC;AAEF,eAAO,MAAM,mBAAmB,eAClB,UAAU,WACb,OAAO,aAoBjB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ValidateCommand.d.ts","sourceRoot":"","sources":["../../../src/commands/ValidateCommand.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAK/C,eAAO,MAAM,eAAe;YAIlB,OAAO;;mBAmDhB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Keypair } from "@solana/web3.js";
|
|
2
|
-
type CreateAppCommandInput = {
|
|
2
|
+
declare type CreateAppCommandInput = {
|
|
3
3
|
publisherMintAddress: string;
|
|
4
4
|
signer: Keypair;
|
|
5
5
|
url: string;
|
|
@@ -9,4 +9,4 @@ export declare const createAppCommand: ({ signer, url, dryRun, publisherMintAddr
|
|
|
9
9
|
appAddress: string;
|
|
10
10
|
}>;
|
|
11
11
|
export {};
|
|
12
|
-
//# sourceMappingURL=
|
|
12
|
+
//# sourceMappingURL=CreateCliApp.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CreateCliApp.d.ts","sourceRoot":"","sources":["../../../../src/commands/create/CreateCliApp.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,OAAO,EAGR,MAAM,iBAAiB,CAAC;AAiDzB,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;;EAqBvB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CreateCliPublisher.d.ts","sourceRoot":"","sources":["../../../../src/commands/create/CreateCliPublisher.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,OAAO,EAER,MAAM,iBAAiB,CAAC;AA8CzB,eAAO,MAAM,sBAAsB;YAKzB,OAAO;SACV,MAAM;YACH,OAAO;;;EAmBhB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Keypair } from "@solana/web3.js";
|
|
2
|
-
type CreateReleaseCommandInput = {
|
|
2
|
+
declare type CreateReleaseCommandInput = {
|
|
3
3
|
appMintAddress: string;
|
|
4
4
|
buildToolsPath: string;
|
|
5
5
|
signer: Keypair;
|
|
@@ -10,4 +10,4 @@ export declare const createReleaseCommand: ({ appMintAddress, buildToolsPath, si
|
|
|
10
10
|
releaseAddress: string;
|
|
11
11
|
} | undefined>;
|
|
12
12
|
export {};
|
|
13
|
-
//# sourceMappingURL=
|
|
13
|
+
//# sourceMappingURL=CreateCliRelease.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CreateCliRelease.d.ts","sourceRoot":"","sources":["../../../../src/commands/create/CreateCliRelease.ts"],"names":[],"mappings":"AAMA,OAAO,EAEL,OAAO,EAGR,MAAM,iBAAiB,CAAC;AAMzB,aAAK,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;AAkDF,eAAO,MAAM,oBAAoB,6DAM9B,yBAAyB;;cAuB3B,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from "./
|
|
2
|
-
export * from "./
|
|
3
|
-
export * from "./
|
|
1
|
+
export * from "./CreateCliPublisher.js";
|
|
2
|
+
export * from "./CreateCliApp.js";
|
|
3
|
+
export * from "./CreateCliRelease.js";
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/commands/create/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/commands/create/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC"}
|
|
@@ -1 +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,
|
|
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,sBAAsB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Keypair } from "@solana/web3.js";
|
|
2
|
-
type PublishRemoveCommandInput = {
|
|
2
|
+
declare type PublishRemoveCommandInput = {
|
|
3
3
|
appMintAddress: string;
|
|
4
4
|
releaseMintAddress: string;
|
|
5
5
|
signer: Keypair;
|
|
@@ -10,4 +10,4 @@ type PublishRemoveCommandInput = {
|
|
|
10
10
|
};
|
|
11
11
|
export declare const publishRemoveCommand: ({ appMintAddress, releaseMintAddress, signer, url, dryRun, requestorIsAuthorized, critical, }: PublishRemoveCommandInput) => Promise<void>;
|
|
12
12
|
export {};
|
|
13
|
-
//# sourceMappingURL=
|
|
13
|
+
//# sourceMappingURL=PublishCliRemove.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PublishCliRemove.d.ts","sourceRoot":"","sources":["../../../../src/commands/publish/PublishCliRemove.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAOtD,aAAK,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,5 +1,5 @@
|
|
|
1
1
|
import { Keypair } from "@solana/web3.js";
|
|
2
|
-
type PublishSubmitCommandInput = {
|
|
2
|
+
declare type PublishSubmitCommandInput = {
|
|
3
3
|
appMintAddress: string;
|
|
4
4
|
releaseMintAddress: string;
|
|
5
5
|
signer: Keypair;
|
|
@@ -10,4 +10,4 @@ type PublishSubmitCommandInput = {
|
|
|
10
10
|
};
|
|
11
11
|
export declare const publishSubmitCommand: ({ appMintAddress, releaseMintAddress, signer, url, dryRun, compliesWithSolanaDappStorePolicies, requestorIsAuthorized, }: PublishSubmitCommandInput) => Promise<void>;
|
|
12
12
|
export {};
|
|
13
|
-
//# sourceMappingURL=
|
|
13
|
+
//# sourceMappingURL=PublishCliSubmit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PublishCliSubmit.d.ts","sourceRoot":"","sources":["../../../../src/commands/publish/PublishCliSubmit.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2B,OAAO,EAAa,MAAM,iBAAiB,CAAC;AAQ9E,aAAK,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,5 +1,5 @@
|
|
|
1
1
|
import { Keypair } from "@solana/web3.js";
|
|
2
|
-
type PublishSupportCommandInput = {
|
|
2
|
+
declare type PublishSupportCommandInput = {
|
|
3
3
|
appMintAddress: string;
|
|
4
4
|
releaseMintAddress: string;
|
|
5
5
|
signer: Keypair;
|
|
@@ -10,4 +10,4 @@ type PublishSupportCommandInput = {
|
|
|
10
10
|
};
|
|
11
11
|
export declare const publishSupportCommand: ({ appMintAddress, releaseMintAddress, signer, url, dryRun, requestorIsAuthorized, requestDetails, }: PublishSupportCommandInput) => Promise<void>;
|
|
12
12
|
export {};
|
|
13
|
-
//# sourceMappingURL=
|
|
13
|
+
//# sourceMappingURL=PublishCliSupport.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PublishCliSupport.d.ts","sourceRoot":"","sources":["../../../../src/commands/publish/PublishCliSupport.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAOtD,aAAK,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,5 +1,5 @@
|
|
|
1
1
|
import { Keypair } from "@solana/web3.js";
|
|
2
|
-
type PublishUpdateCommandInput = {
|
|
2
|
+
declare type PublishUpdateCommandInput = {
|
|
3
3
|
appMintAddress: string;
|
|
4
4
|
releaseMintAddress: string;
|
|
5
5
|
signer: Keypair;
|
|
@@ -11,4 +11,4 @@ type PublishUpdateCommandInput = {
|
|
|
11
11
|
};
|
|
12
12
|
export declare const publishUpdateCommand: ({ appMintAddress, releaseMintAddress, signer, url, dryRun, compliesWithSolanaDappStorePolicies, requestorIsAuthorized, critical, }: PublishUpdateCommandInput) => Promise<void>;
|
|
13
13
|
export {};
|
|
14
|
-
//# sourceMappingURL=
|
|
14
|
+
//# sourceMappingURL=PublishCliUpdate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PublishCliUpdate.d.ts","sourceRoot":"","sources":["../../../../src/commands/publish/PublishCliUpdate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAOtD,aAAK,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"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from "./
|
|
2
|
-
export * from "./
|
|
3
|
-
export * from "./
|
|
4
|
-
export * from "./
|
|
1
|
+
export * from "./PublishCliRemove.js";
|
|
2
|
+
export * from "./PublishCliSubmit.js";
|
|
3
|
+
export * from "./PublishCliSupport.js";
|
|
4
|
+
export * from "./PublishCliUpdate.js";
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/commands/publish/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/commands/publish/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC"}
|