@calimero-network/mero-js 17.0.0 → 18.0.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/dist/index.cjs CHANGED
@@ -846,34 +846,15 @@ var AdminApiClient = class {
846
846
  return this.httpClient.get("/admin-api/is-authed");
847
847
  }
848
848
  // ---- Application Management ----
849
- async installApplication(request) {
850
- return unwrap(await this.httpClient.post("/admin-api/install-application", request));
851
- }
852
849
  /**
853
- * Resolve a `package@version` to its registry artifact URL and install it.
854
- * Node install is URL-based (no node-side package+version resolution), so this
855
- * fetches the bundle manifest from the registry, derives the `.mpk` artifact
856
- * URL, then calls {@link installApplication}. `registryUrl` is the registry
857
- * origin. This is the discrete "download" step an Updates flow pairs with a
858
- * subsequent `upgradeGroup`.
850
+ * Install a published application by its `package@version` coordinates. The
851
+ * node resolves and fetches them from its own configured `[registry]`, so no
852
+ * URL is passed and none is accepted. A 502 means the node's source has
853
+ * nothing published at those coordinates. This is the discrete "download"
854
+ * step an Updates flow pairs with a subsequent `upgradeGroup`.
859
855
  */
860
- async installFromRegistry(registryUrl, packageName, version) {
861
- const base = new URL(registryUrl).origin;
862
- const manifestUrl = new URL(
863
- `/api/v2/bundles/${encodeURIComponent(packageName)}/${encodeURIComponent(version)}`,
864
- base
865
- ).toString();
866
- const resp = await fetchRegistry(manifestUrl, "manifest", `${packageName}@${version}`);
867
- const bundle = await resp.json();
868
- const pkg = encodeURIComponent(bundle.package);
869
- const ver = encodeURIComponent(bundle.appVersion);
870
- const artifactUrl = `${base}/artifacts/${pkg}/${ver}/${pkg}-${ver}.mpk`;
871
- return this.installApplication({
872
- url: artifactUrl,
873
- package: bundle.package,
874
- version: bundle.appVersion,
875
- metadata: []
876
- });
856
+ async installApplication(request) {
857
+ return unwrap(await this.httpClient.post("/admin-api/install-application", request));
877
858
  }
878
859
  /**
879
860
  * List a package's published versions from the registry, newest-first by