@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.mjs CHANGED
@@ -769,34 +769,15 @@ var AdminApiClient = class {
769
769
  return this.httpClient.get("/admin-api/is-authed");
770
770
  }
771
771
  // ---- Application Management ----
772
- async installApplication(request) {
773
- return unwrap(await this.httpClient.post("/admin-api/install-application", request));
774
- }
775
772
  /**
776
- * Resolve a `package@version` to its registry artifact URL and install it.
777
- * Node install is URL-based (no node-side package+version resolution), so this
778
- * fetches the bundle manifest from the registry, derives the `.mpk` artifact
779
- * URL, then calls {@link installApplication}. `registryUrl` is the registry
780
- * origin. This is the discrete "download" step an Updates flow pairs with a
781
- * subsequent `upgradeGroup`.
773
+ * Install a published application by its `package@version` coordinates. The
774
+ * node resolves and fetches them from its own configured `[registry]`, so no
775
+ * URL is passed and none is accepted. A 502 means the node's source has
776
+ * nothing published at those coordinates. This is the discrete "download"
777
+ * step an Updates flow pairs with a subsequent `upgradeGroup`.
782
778
  */
783
- async installFromRegistry(registryUrl, packageName, version) {
784
- const base = new URL(registryUrl).origin;
785
- const manifestUrl = new URL(
786
- `/api/v2/bundles/${encodeURIComponent(packageName)}/${encodeURIComponent(version)}`,
787
- base
788
- ).toString();
789
- const resp = await fetchRegistry(manifestUrl, "manifest", `${packageName}@${version}`);
790
- const bundle = await resp.json();
791
- const pkg = encodeURIComponent(bundle.package);
792
- const ver = encodeURIComponent(bundle.appVersion);
793
- const artifactUrl = `${base}/artifacts/${pkg}/${ver}/${pkg}-${ver}.mpk`;
794
- return this.installApplication({
795
- url: artifactUrl,
796
- package: bundle.package,
797
- version: bundle.appVersion,
798
- metadata: []
799
- });
779
+ async installApplication(request) {
780
+ return unwrap(await this.httpClient.post("/admin-api/install-application", request));
800
781
  }
801
782
  /**
802
783
  * List a package's published versions from the registry, newest-first by