@calimero-network/registry-cli 1.15.0 → 1.15.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/index.js +30 -6
- package/dist/index.js.map +1 -1
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -14,6 +14,7 @@ import cors from '@fastify/cors';
|
|
|
14
14
|
import * as tar from 'tar';
|
|
15
15
|
|
|
16
16
|
var CalimeroRegistryClient = class {
|
|
17
|
+
api;
|
|
17
18
|
/**
|
|
18
19
|
* Creates a new Calimero Registry client instance.
|
|
19
20
|
*
|
|
@@ -399,6 +400,9 @@ var CalimeroRegistryClient = class {
|
|
|
399
400
|
}
|
|
400
401
|
};
|
|
401
402
|
var LocalConfig = class {
|
|
403
|
+
configPath;
|
|
404
|
+
dataDir;
|
|
405
|
+
config;
|
|
402
406
|
constructor() {
|
|
403
407
|
this.configPath = path7.join(
|
|
404
408
|
os.homedir(),
|
|
@@ -558,6 +562,11 @@ var LocalConfig = class {
|
|
|
558
562
|
}
|
|
559
563
|
};
|
|
560
564
|
var LocalDataStore = class {
|
|
565
|
+
config;
|
|
566
|
+
data;
|
|
567
|
+
appsFile;
|
|
568
|
+
bundleManifestsFile;
|
|
569
|
+
artifactsFile;
|
|
561
570
|
constructor(config) {
|
|
562
571
|
this.config = config;
|
|
563
572
|
this.appsFile = path7.join(config.getDataDir(), "apps.json");
|
|
@@ -614,7 +623,8 @@ var LocalDataStore = class {
|
|
|
614
623
|
);
|
|
615
624
|
} catch (error) {
|
|
616
625
|
throw new Error(
|
|
617
|
-
`Failed to save data: ${error instanceof Error ? error.message : "Unknown error"}
|
|
626
|
+
`Failed to save data: ${error instanceof Error ? error.message : "Unknown error"}`,
|
|
627
|
+
{ cause: error }
|
|
618
628
|
);
|
|
619
629
|
}
|
|
620
630
|
}
|
|
@@ -768,6 +778,9 @@ var LocalDataStore = class {
|
|
|
768
778
|
}
|
|
769
779
|
};
|
|
770
780
|
var LocalArtifactServer = class {
|
|
781
|
+
config;
|
|
782
|
+
dataStore;
|
|
783
|
+
artifactsDir;
|
|
771
784
|
constructor(config, dataStore) {
|
|
772
785
|
this.config = config;
|
|
773
786
|
this.dataStore = dataStore;
|
|
@@ -925,6 +938,7 @@ var LocalArtifactServer = class {
|
|
|
925
938
|
}
|
|
926
939
|
};
|
|
927
940
|
var RemoteRegistryClient = class {
|
|
941
|
+
client;
|
|
928
942
|
constructor(baseURL, timeout) {
|
|
929
943
|
this.client = new CalimeroRegistryClient({
|
|
930
944
|
baseURL,
|
|
@@ -948,6 +962,9 @@ var RemoteRegistryClient = class {
|
|
|
948
962
|
}
|
|
949
963
|
};
|
|
950
964
|
var LocalRegistryClient = class {
|
|
965
|
+
config;
|
|
966
|
+
dataStore;
|
|
967
|
+
artifactServer;
|
|
951
968
|
constructor() {
|
|
952
969
|
this.config = new LocalConfig();
|
|
953
970
|
this.dataStore = new LocalDataStore(this.config);
|
|
@@ -1314,7 +1331,8 @@ async function uploadToIPFS(filePath) {
|
|
|
1314
1331
|
return simulatedCid;
|
|
1315
1332
|
} catch (error) {
|
|
1316
1333
|
throw new Error(
|
|
1317
|
-
`Failed to upload to IPFS: ${error instanceof Error ? error.message : "Unknown error"}
|
|
1334
|
+
`Failed to upload to IPFS: ${error instanceof Error ? error.message : "Unknown error"}`,
|
|
1335
|
+
{ cause: error }
|
|
1318
1336
|
);
|
|
1319
1337
|
}
|
|
1320
1338
|
}
|
|
@@ -1329,7 +1347,8 @@ This is a demo file that would normally contain the actual application data.`;
|
|
|
1329
1347
|
return finalOutputPath;
|
|
1330
1348
|
} catch (error) {
|
|
1331
1349
|
throw new Error(
|
|
1332
|
-
`Failed to download from IPFS: ${error instanceof Error ? error.message : "Unknown error"}
|
|
1350
|
+
`Failed to download from IPFS: ${error instanceof Error ? error.message : "Unknown error"}`,
|
|
1351
|
+
{ cause: error }
|
|
1333
1352
|
);
|
|
1334
1353
|
}
|
|
1335
1354
|
}
|
|
@@ -1372,9 +1391,12 @@ var ipfsCommand = new Command("ipfs").description("IPFS operations").addCommand(
|
|
|
1372
1391
|
})
|
|
1373
1392
|
);
|
|
1374
1393
|
var LocalRegistryServer = class {
|
|
1394
|
+
config;
|
|
1395
|
+
dataStore;
|
|
1396
|
+
artifactServer;
|
|
1397
|
+
server = null;
|
|
1398
|
+
isRunning = false;
|
|
1375
1399
|
constructor(config) {
|
|
1376
|
-
this.server = null;
|
|
1377
|
-
this.isRunning = false;
|
|
1378
1400
|
this.config = config;
|
|
1379
1401
|
this.dataStore = new LocalDataStore(config);
|
|
1380
1402
|
this.artifactServer = new LocalArtifactServer(config, this.dataStore);
|
|
@@ -1773,6 +1795,8 @@ localCommand.addCommand(
|
|
|
1773
1795
|
})
|
|
1774
1796
|
);
|
|
1775
1797
|
var RemoteConfig = class {
|
|
1798
|
+
configPath;
|
|
1799
|
+
config;
|
|
1776
1800
|
constructor() {
|
|
1777
1801
|
this.configPath = path7.join(
|
|
1778
1802
|
os.homedir(),
|
|
@@ -2408,7 +2432,7 @@ Note:
|
|
|
2408
2432
|
- Priority: flag > environment variable > config file > default
|
|
2409
2433
|
`
|
|
2410
2434
|
).action(async (bundleFile, options) => {
|
|
2411
|
-
let mpkPath
|
|
2435
|
+
let mpkPath;
|
|
2412
2436
|
let tempMpk = null;
|
|
2413
2437
|
try {
|
|
2414
2438
|
if (!options.remote && (options.url || options.apiKey)) {
|