Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@holochain/client

Package Overview
Dependencies
Maintainers
13
Versions
96
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@holochain/client - npm Package Compare versions

Comparing version 0.10.3 to 0.10.4

3

lib/api/admin/types.d.ts

@@ -222,7 +222,6 @@ /// <reference types="node" />

export declare type DeleteArchivedCloneCellsResponse = void;
export interface GrantZomeCallCapabilityPayload {
export interface GrantZomeCallCapabilityRequest {
cell_id: CellId;
cap_grant: ZomeCallCapGrant;
}
export declare type GrantZomeCallCapabilityRequest = GrantZomeCallCapabilityPayload;
export declare type GrantZomeCallCapabilityResponse = void;

@@ -229,0 +228,0 @@ export interface AdminApi {

import { InstalledAppId } from "../types.js";
export declare const LAUNCHER_ENV_URL = "/.launcher-env.json";
export interface LauncherEnvironment {

@@ -8,2 +7,3 @@ APP_INTERFACE_PORT: number;

}
export declare function getLauncherEnvironment(): Promise<LauncherEnvironment | undefined>;
export declare const isLauncher: boolean;
export declare const getLauncherEnvironment: () => LauncherEnvironment | undefined;

@@ -1,38 +0,5 @@

import fetch from "cross-fetch";
// This is based on
// https://github.com/holochain/launcher/blob/213aae208c58f2496811d80859723b71f6750426/crates/holochain_web_app_manager/src/caddy/utils.rs#L49
export const LAUNCHER_ENV_URL = "/.launcher-env.json";
async function fetchLauncherEnvironment() {
const env = await fetch(LAUNCHER_ENV_URL);
if (env.ok) {
const launcherEnvironment = await env.json();
return launcherEnvironment;
}
else {
// We are not in the launcher environment
if (env.status === 404) {
console.warn("[@holochain/conductor-api]: you are in a development environment. When this UI is run in the Holochain Launcher, `AppWebsocket.connect()`, `AdminWebsocket.connect()` and `appWebsocket.appInfo()` will have their parameters ignored and substituted by the ones provided by the Holochain Launcher.");
return undefined;
}
else {
throw new Error(`Error trying to fetch the launcher environment: ${env.statusText}`);
}
}
}
const isBrowser = typeof window !== "undefined";
const isJest = typeof process !== "undefined" &&
process.env &&
process.env.JEST_WORKER_ID !== undefined;
let promise;
if (isBrowser && !isJest) {
promise = fetchLauncherEnvironment().catch(console.error);
}
export async function getLauncherEnvironment() {
if (isBrowser) {
return promise;
}
else {
return undefined;
}
}
export const isLauncher = typeof window === "object" && "__HC_LAUNCHER_ENV__" in window;
export const getLauncherEnvironment = () => isLauncher
? window.__HC_LAUNCHER_ENV__
: undefined;
//# sourceMappingURL=launcher.js.map
{
"name": "@holochain/client",
"version": "0.10.3",
"version": "0.10.4",
"description": "A JavaScript client for the Holochain Conductor API",

@@ -40,3 +40,2 @@ "author": "Holochain Foundation <info@holochain.org> (http://holochain.org)",

"@msgpack/msgpack": "^2.7.2",
"cross-fetch": "^3.1.5",
"emittery": "^1.0.1",

@@ -43,0 +42,0 @@ "isomorphic-ws": "^5.0.0",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc