@airmoney-degn/airmoney-cli 0.19.0 → 0.19.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/create.js
CHANGED
|
@@ -47,7 +47,7 @@ async function createCommand({ name, template, locationFolder, quiet, }) {
|
|
|
47
47
|
const projectPath = path.join(process.cwd(), folderName);
|
|
48
48
|
if (template) {
|
|
49
49
|
(0, LogService_1.log)('cloning project').white();
|
|
50
|
-
(0, child_process_1.execSync)(`git clone --separate-git-dir=$(mktemp -u) https://github.com/
|
|
50
|
+
(0, child_process_1.execSync)(`git clone --separate-git-dir=$(mktemp -u) https://github.com/airmoney-degn/airmoney-dapp-quickstart ${folderName}`);
|
|
51
51
|
if (fs.lstatSync(path.join(projectPath, '.git')).isDirectory()) {
|
|
52
52
|
fs.rmdirSync(path.join(projectPath, '.git'));
|
|
53
53
|
}
|
package/dist/config.json
CHANGED
|
@@ -33,7 +33,7 @@ class AirmoneyService {
|
|
|
33
33
|
switch (rpcReq.method) {
|
|
34
34
|
case 'setImage':
|
|
35
35
|
case 'setAnimate':
|
|
36
|
-
event = await (0, server_1.displayImage)(rpcReq, this.appName || '', this.config.appUrl);
|
|
36
|
+
event = await (0, server_1.displayImage)(rpcReq, this.appName || '', this.config.appUrl, this.config.locationFolder);
|
|
37
37
|
break;
|
|
38
38
|
}
|
|
39
39
|
if (simulator) {
|
|
@@ -33,13 +33,14 @@ class ServeOrchestrator {
|
|
|
33
33
|
createAirmoneyService() {
|
|
34
34
|
return new AirmoneyService_1.AirmoneyService({
|
|
35
35
|
appUrl: this.config.appUrl,
|
|
36
|
+
locationFolder: this.config.locationFolder,
|
|
36
37
|
});
|
|
37
38
|
}
|
|
38
39
|
async start() {
|
|
39
40
|
// Check for port conflicts first
|
|
40
41
|
await PortManager_1.PortManager.checkPortConflicts();
|
|
41
42
|
// Load metadata (from remote URL if appUrl is provided, otherwise locally)
|
|
42
|
-
this.metadata = await (0, metadata_1.loadMetadata)(
|
|
43
|
+
this.metadata = await (0, metadata_1.loadMetadata)(this.config.locationFolder, this.config.appUrl);
|
|
43
44
|
// Update AirmoneyService with loaded metadata
|
|
44
45
|
this.airmoneyService.setAppName(this.metadata?.name || null);
|
|
45
46
|
// Validate metadata
|
package/dist/util/server.js
CHANGED
|
@@ -40,7 +40,7 @@ exports.displayImage = displayImage;
|
|
|
40
40
|
const path_1 = __importDefault(require("path"));
|
|
41
41
|
const fs = __importStar(require("fs"));
|
|
42
42
|
const remote_1 = require("./remote");
|
|
43
|
-
async function displayImage(request, appName, appUrl) {
|
|
43
|
+
async function displayImage(request, appName, appUrl, locationFolder) {
|
|
44
44
|
const f = request.params[0].replace(new RegExp(`^${appName}\\/`), '');
|
|
45
45
|
let file;
|
|
46
46
|
if (appUrl) {
|
|
@@ -54,7 +54,10 @@ async function displayImage(request, appName, appUrl) {
|
|
|
54
54
|
}
|
|
55
55
|
else {
|
|
56
56
|
// Read from local file system
|
|
57
|
-
|
|
57
|
+
const filePath = path_1.default.join(locationFolder || '.', f);
|
|
58
|
+
file = fs.readFileSync(filePath, {
|
|
59
|
+
encoding: 'base64',
|
|
60
|
+
});
|
|
58
61
|
}
|
|
59
62
|
const fileType = path_1.default.extname(f);
|
|
60
63
|
let mime = '';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@airmoney-degn/airmoney-cli",
|
|
3
|
-
"version": "0.19.
|
|
3
|
+
"version": "0.19.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"
|