@solana-mobile/dapp-store-cli 0.1.9 → 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 +20 -10
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/package.json +6 -3
- package/lib/esm/utils.js +40 -16
- 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 +6 -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 +30 -10
- package/src/prebuild_schema/publishing_source.yaml +44 -0
- package/src/prebuild_schema/schemagen.js +20 -0
- package/src/utils.ts +52 -19
- package/lib/esm/config/schema.json +0 -195
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,C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ot":"","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,8 +4,13 @@ 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>;
|
|
11
16
|
export declare const isDevnet: (rpcUrl: string) => boolean;
|
|
@@ -13,7 +18,7 @@ export declare const isTestnet: (rpcUrl: string) => boolean;
|
|
|
13
18
|
export declare const checkSubmissionNetwork: (rpcUrl: string) => void;
|
|
14
19
|
export declare const generateNetworkSuffix: (rpcUrl: string) => string;
|
|
15
20
|
export declare const showMessage: (titleMessage?: string, contentMessage?: string, isError?: boolean) => void;
|
|
16
|
-
|
|
21
|
+
type SaveToConfigArgs = {
|
|
17
22
|
publisher?: Pick<Publisher, "address">;
|
|
18
23
|
app?: Pick<App, "address">;
|
|
19
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,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E,SAAS,CAAC,CAAC;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"}}}}}
|
package/src/index.ts
CHANGED
|
@@ -7,11 +7,20 @@ import {
|
|
|
7
7
|
publishSupportCommand,
|
|
8
8
|
publishUpdateCommand
|
|
9
9
|
} from "./commands/publish/index.js";
|
|
10
|
-
import {
|
|
10
|
+
import {
|
|
11
|
+
checkForSelfUpdate,
|
|
12
|
+
checkSubmissionNetwork,
|
|
13
|
+
Constants,
|
|
14
|
+
generateNetworkSuffix,
|
|
15
|
+
getConfigFile,
|
|
16
|
+
parseKeypair,
|
|
17
|
+
showMessage
|
|
18
|
+
} from "./utils.js";
|
|
11
19
|
import terminalLink from "terminal-link";
|
|
12
20
|
import boxen from "boxen";
|
|
13
21
|
|
|
14
22
|
import * as dotenv from "dotenv";
|
|
23
|
+
import { initScaffold } from "./commands/scaffolding/index.js";
|
|
15
24
|
|
|
16
25
|
dotenv.config();
|
|
17
26
|
|
|
@@ -49,9 +58,20 @@ async function tryWithErrorMessage(block: () => Promise<any>) {
|
|
|
49
58
|
async function main() {
|
|
50
59
|
program
|
|
51
60
|
.name("dapp-store")
|
|
52
|
-
.version(
|
|
61
|
+
.version(Constants.CLI_VERSION)
|
|
53
62
|
.description("CLI to assist with publishing to the Saga Dapp Store");
|
|
54
63
|
|
|
64
|
+
const initCommand = program
|
|
65
|
+
.command("init")
|
|
66
|
+
.description("First-time initialization of tooling configuration")
|
|
67
|
+
.action(async () => {
|
|
68
|
+
tryWithErrorMessage(async () => {
|
|
69
|
+
const msg = initScaffold();
|
|
70
|
+
|
|
71
|
+
showMessage("Initialized", msg);
|
|
72
|
+
})
|
|
73
|
+
});
|
|
74
|
+
|
|
55
75
|
const createCommand = program
|
|
56
76
|
.command("create")
|
|
57
77
|
.description("Create a `publisher`, `app`, or `release`");
|
|
@@ -226,11 +246,11 @@ async function main() {
|
|
|
226
246
|
)
|
|
227
247
|
.option(
|
|
228
248
|
"-a, --app-mint-address <app-mint-address>",
|
|
229
|
-
"The mint address of the app NFT. If not specified, the value from config
|
|
249
|
+
"The mint address of the app NFT. If not specified, the value from your config file will be used."
|
|
230
250
|
)
|
|
231
251
|
.option(
|
|
232
252
|
"-r, --release-mint-address <release-mint-address>",
|
|
233
|
-
"The mint address of the release NFT. If not specified, the value from config
|
|
253
|
+
"The mint address of the release NFT. If not specified, the value from your config file will be used."
|
|
234
254
|
)
|
|
235
255
|
.option("-u, --url <url>", "RPC URL", "https://devnet.genesysgo.net")
|
|
236
256
|
.option(
|
|
@@ -295,11 +315,11 @@ async function main() {
|
|
|
295
315
|
)
|
|
296
316
|
.option(
|
|
297
317
|
"-a, --app-mint-address <app-mint-address>",
|
|
298
|
-
"The mint address of the app NFT. If not specified, the value from config
|
|
318
|
+
"The mint address of the app NFT. If not specified, the value from your config file will be used."
|
|
299
319
|
)
|
|
300
320
|
.option(
|
|
301
321
|
"-r, --release-mint-address <release-mint-address>",
|
|
302
|
-
"The mint address of the release NFT. If not specified, the value from config
|
|
322
|
+
"The mint address of the release NFT. If not specified, the value from your config file will be used."
|
|
303
323
|
)
|
|
304
324
|
.option("-c, --critical", "Flag for a critical app update request")
|
|
305
325
|
.option("-u, --url <url>", "RPC URL", "https://devnet.genesysgo.net")
|
|
@@ -363,11 +383,11 @@ async function main() {
|
|
|
363
383
|
)
|
|
364
384
|
.option(
|
|
365
385
|
"-a, --app-mint-address <app-mint-address>",
|
|
366
|
-
"The mint address of the app NFT. If not specified, the value from config
|
|
386
|
+
"The mint address of the app NFT. If not specified, the value from your config file will be used."
|
|
367
387
|
)
|
|
368
388
|
.option(
|
|
369
389
|
"-r, --release-mint-address <release-mint-address>",
|
|
370
|
-
"The mint address of the release NFT. If not specified, the value from config
|
|
390
|
+
"The mint address of the release NFT. If not specified, the value from your config file will be used."
|
|
371
391
|
)
|
|
372
392
|
.option("-c, --critical", "Flag for a critical app removal request")
|
|
373
393
|
.option("-u, --url <url>", "RPC URL", "https://devnet.genesysgo.net")
|
|
@@ -429,11 +449,11 @@ async function main() {
|
|
|
429
449
|
)
|
|
430
450
|
.option(
|
|
431
451
|
"-a, --app-mint-address <app-mint-address>",
|
|
432
|
-
"The mint address of the app NFT. If not specified, the value from config
|
|
452
|
+
"The mint address of the app NFT. If not specified, the value from your config file will be used."
|
|
433
453
|
)
|
|
434
454
|
.option(
|
|
435
455
|
"-r, --release-mint-address <release-mint-address>",
|
|
436
|
-
"The mint address of the release NFT. If not specified, the value from config
|
|
456
|
+
"The mint address of the release NFT. If not specified, the value from your config file will be used."
|
|
437
457
|
)
|
|
438
458
|
.option("-u, --url <url>", "RPC URL", "https://devnet.genesysgo.net")
|
|
439
459
|
.option(
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
publisher:
|
|
2
|
+
name: <<YOUR_PUBLISHER_NAME>>
|
|
3
|
+
address: ""
|
|
4
|
+
website: <<URL_OF_PUBLISHER_WEBSITE>>
|
|
5
|
+
email: <<EMAIL_ADDRESS_TO_CONTACT_PUBLISHER>>
|
|
6
|
+
media:
|
|
7
|
+
- purpose: icon
|
|
8
|
+
uri: <<RELATIVE_PATH_TO_PUBLISHER_ICON>>
|
|
9
|
+
app:
|
|
10
|
+
name: <<APP_NAME>>
|
|
11
|
+
address: ""
|
|
12
|
+
android_package: <<ANDROID_PACKAGE_NAME>>
|
|
13
|
+
urls:
|
|
14
|
+
license_url: <<URL_OF_APP_LICENSE_OR_TERMS_OF_SERVICE>>
|
|
15
|
+
copyright_url: <<URL_OF_COPYRIGHT_DETAILS_FOR_APP>>
|
|
16
|
+
privacy_policy_url: <<URL_OF_APP_PRIVACY_POLICY>>
|
|
17
|
+
website: <<URL_OF_APP_WEBSITE>>
|
|
18
|
+
media:
|
|
19
|
+
- purpose: icon
|
|
20
|
+
uri: <<RELATIVE_PATH_TO_APP_ICON>>
|
|
21
|
+
release:
|
|
22
|
+
address: ""
|
|
23
|
+
media:
|
|
24
|
+
- purpose: icon
|
|
25
|
+
uri: <<RELATIVE_PATH_TO_RELEASE_ICON>>
|
|
26
|
+
- purpose: screenshot
|
|
27
|
+
uri: <<RELATIVE_PATH_TO_SCREENSHOT>>
|
|
28
|
+
files:
|
|
29
|
+
- purpose: install
|
|
30
|
+
uri: <<RELATIVE_PATH_TO_APK>>
|
|
31
|
+
catalog:
|
|
32
|
+
en-US:
|
|
33
|
+
name: |
|
|
34
|
+
<<APP_NAME>>
|
|
35
|
+
long_description: |
|
|
36
|
+
<<LONG_APP_DESCRIPTION>>
|
|
37
|
+
new_in_version: |
|
|
38
|
+
<<WHATS_NEW_IN_THIS_VERSION>>
|
|
39
|
+
saga_features: |
|
|
40
|
+
<<ANY_FEATURES_ONLY_AVAILBLE_WHEN_RUNNING_ON_SAGA>>
|
|
41
|
+
solana_mobile_dapp_publisher_portal:
|
|
42
|
+
google_store_package: <<ANDROID_PACKAGE_NAME_OF_GOOGLE_PLAY_STORE_VERSION_IF_DIFFERENT>>
|
|
43
|
+
testing_instructions: >
|
|
44
|
+
<<TESTING_INSTRUCTIONS>>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import fs, { read } from "fs";
|
|
2
|
+
import yaml from "js-yaml";
|
|
3
|
+
import generateSchema from "generate-schema";
|
|
4
|
+
|
|
5
|
+
try {
|
|
6
|
+
const yamlSrc = fs.readFileSync('./src/prebuild_schema/publishing_source.yaml', 'utf8')
|
|
7
|
+
const convertedYaml = yaml.load(yamlSrc);
|
|
8
|
+
fs.writeFileSync('./src/generated/config_obj.json', Buffer.from(JSON.stringify(convertedYaml)), 'utf-8');
|
|
9
|
+
|
|
10
|
+
const schema = generateSchema.json('result', convertedYaml);
|
|
11
|
+
|
|
12
|
+
// Generator adds some keys/values we don't need & mess up validation
|
|
13
|
+
delete schema.$schema;
|
|
14
|
+
delete schema.title;
|
|
15
|
+
|
|
16
|
+
const toWrite = Buffer.from(JSON.stringify(schema));
|
|
17
|
+
fs.writeFileSync('./src/generated/config_schema.json', toWrite, 'utf-8');
|
|
18
|
+
} catch (e) {
|
|
19
|
+
console.log(":: Schema generation step failed ::");
|
|
20
|
+
}
|