@airmoney-degn/airmoney-cli 0.25.1 → 0.25.2
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/dist/cli/build.js +2 -2
- package/dist/cli/upload.js +3 -5
- package/dist/config.json +1 -1
- package/dist/util/metadata.js +0 -10
- package/package.json +1 -1
package/dist/cli/build.js
CHANGED
|
@@ -72,8 +72,8 @@ async function buildCommand({ locationFolder, publicDir }) {
|
|
|
72
72
|
cwd: projectPath,
|
|
73
73
|
stdio: 'inherit',
|
|
74
74
|
});
|
|
75
|
-
// 2. Find the binary
|
|
76
|
-
const binName =
|
|
75
|
+
// 2. Find the binary
|
|
76
|
+
const binName = 'user_app';
|
|
77
77
|
const binPath = path.join(projectPath, 'target', 'aarch64-unknown-linux-gnu', 'release', binName);
|
|
78
78
|
if (!fs.existsSync(binPath)) {
|
|
79
79
|
(0, LogService_1.log)(`Binary not found at expected path: ${binPath}`).white();
|
package/dist/cli/upload.js
CHANGED
|
@@ -131,7 +131,7 @@ async function preparePackage(meta, projectPath, publicDir) {
|
|
|
131
131
|
const pkgName = (0, metadata_1.getPackageName)(meta);
|
|
132
132
|
if (meta.type === 'Native') {
|
|
133
133
|
(0, LogService_1.log)(`Preparing Native package for ${meta.displayName}...`).white();
|
|
134
|
-
const binName =
|
|
134
|
+
const binName = 'user_app';
|
|
135
135
|
const binInTarget = path_1.default.join(projectPath, 'target', 'aarch64-unknown-linux-gnu', 'release', binName);
|
|
136
136
|
const binAtRoot = path_1.default.join(projectPath, binName);
|
|
137
137
|
const metadataAtRoot = path_1.default.join(projectPath, 'metadata.json');
|
|
@@ -164,7 +164,7 @@ async function preparePackage(meta, projectPath, publicDir) {
|
|
|
164
164
|
}
|
|
165
165
|
}
|
|
166
166
|
else {
|
|
167
|
-
throw new Error(
|
|
167
|
+
throw new Error('Native binary not found. Either run "airmoney-cli build" first, or point -f to a folder that already contains user_app, metadata.json, and dapp-logo.png at root (e.g. dist/).');
|
|
168
168
|
}
|
|
169
169
|
}
|
|
170
170
|
else {
|
|
@@ -255,9 +255,7 @@ async function uploadCommand({ network, locationFolder, publicDir, packagePath:
|
|
|
255
255
|
throw new Error(`No metadata.json found next to the package. Put metadata.json in the same directory as ${path_1.default.basename(zipPath)}.`);
|
|
256
256
|
}
|
|
257
257
|
(0, LogService_1.log)('Verifying zip package...').white();
|
|
258
|
-
const verifyOptions = meta.type === 'Native'
|
|
259
|
-
? { binaryName: (0, metadata_1.readPackageNameFromCargoToml)(projectPath) ?? 'user_app' }
|
|
260
|
-
: undefined;
|
|
258
|
+
const verifyOptions = meta.type === 'Native' ? { binaryName: 'user_app' } : undefined;
|
|
261
259
|
await (0, tarball_1.verifyZipPackage)(zipPath, meta.type, verifyOptions);
|
|
262
260
|
(0, LogService_1.log)('Zip package verified.').green();
|
|
263
261
|
const dappService = new DappService_1.DappService(userId, apiKey, network);
|
package/dist/config.json
CHANGED
package/dist/util/metadata.js
CHANGED
|
@@ -39,7 +39,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
39
39
|
exports.loadMetadata = loadMetadata;
|
|
40
40
|
exports.saveMetadata = saveMetadata;
|
|
41
41
|
exports.getPackageName = getPackageName;
|
|
42
|
-
exports.readPackageNameFromCargoToml = readPackageNameFromCargoToml;
|
|
43
42
|
exports.readVersionFromCargoToml = readVersionFromCargoToml;
|
|
44
43
|
exports.applyVersionFromCargoToml = applyVersionFromCargoToml;
|
|
45
44
|
exports.populateBuildMetadata = populateBuildMetadata;
|
|
@@ -107,15 +106,6 @@ function parseCargoToml(projectPath) {
|
|
|
107
106
|
return null;
|
|
108
107
|
}
|
|
109
108
|
}
|
|
110
|
-
/**
|
|
111
|
-
* Reads the package name from Cargo.toml [package] section (used as binary name).
|
|
112
|
-
* Returns null if file is missing or name is not found.
|
|
113
|
-
*/
|
|
114
|
-
function readPackageNameFromCargoToml(projectPath) {
|
|
115
|
-
const parsed = parseCargoToml(projectPath);
|
|
116
|
-
const name = parsed?.package?.name;
|
|
117
|
-
return typeof name === 'string' ? name : null;
|
|
118
|
-
}
|
|
119
109
|
/**
|
|
120
110
|
* Reads the package version from Cargo.toml [package] section.
|
|
121
111
|
* Returns null if file is missing or version is not found.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@airmoney-degn/airmoney-cli",
|
|
3
|
-
"version": "0.25.
|
|
3
|
+
"version": "0.25.2",
|
|
4
4
|
"description": "airmoney-cli is a command-line interface tool designed to facilitate the development and management of decentralized applications (DApps) for Airmoney.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|