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

@perspect3vism/ad4m

Package Overview
Dependencies
Maintainers
2
Versions
80
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@perspect3vism/ad4m - npm Package Compare versions

Comparing version 0.1.6 to 0.1.7

64

lib/Ad4mClient.js
"use strict";
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, privateMap, value) {
if (!privateMap.has(receiver)) {
throw new TypeError("attempted to set private field on non-instance");
}
privateMap.set(receiver, value);
return value;
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
if (kind === "m") throw new TypeError("Private method is not writable");
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
};
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, privateMap) {
if (!privateMap.has(receiver)) {
throw new TypeError("attempted to get private field on non-instance");
}
return privateMap.get(receiver);
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
};

@@ -18,3 +16,3 @@ var __importDefault = (this && this.__importDefault) || function (mod) {

};
var _apolloClient, _agentClient, _expressionClient, _languageClient, _neighbourhoodClient, _perspectiveClient, _runtimeClient;
var _Ad4mClient_apolloClient, _Ad4mClient_agentClient, _Ad4mClient_expressionClient, _Ad4mClient_languageClient, _Ad4mClient_neighbourhoodClient, _Ad4mClient_perspectiveClient, _Ad4mClient_runtimeClient;
Object.defineProperty(exports, "__esModule", { value: true });

@@ -40,37 +38,37 @@ exports.Ad4mClient = void 0;

constructor(client) {
_apolloClient.set(this, void 0);
_agentClient.set(this, void 0);
_expressionClient.set(this, void 0);
_languageClient.set(this, void 0);
_neighbourhoodClient.set(this, void 0);
_perspectiveClient.set(this, void 0);
_runtimeClient.set(this, void 0);
__classPrivateFieldSet(this, _apolloClient, client);
__classPrivateFieldSet(this, _agentClient, new AgentClient_1.default(client));
__classPrivateFieldSet(this, _expressionClient, new ExpressionClient_1.default(client));
__classPrivateFieldSet(this, _languageClient, new LanguageClient_1.LanguageClient(client));
__classPrivateFieldSet(this, _neighbourhoodClient, new NeighbourhoodClient_1.default(client));
__classPrivateFieldSet(this, _perspectiveClient, new PerspectiveClient_1.default(client));
__classPrivateFieldSet(this, _runtimeClient, new RuntimeClient_1.default(client));
_Ad4mClient_apolloClient.set(this, void 0);
_Ad4mClient_agentClient.set(this, void 0);
_Ad4mClient_expressionClient.set(this, void 0);
_Ad4mClient_languageClient.set(this, void 0);
_Ad4mClient_neighbourhoodClient.set(this, void 0);
_Ad4mClient_perspectiveClient.set(this, void 0);
_Ad4mClient_runtimeClient.set(this, void 0);
__classPrivateFieldSet(this, _Ad4mClient_apolloClient, client, "f");
__classPrivateFieldSet(this, _Ad4mClient_agentClient, new AgentClient_1.default(client), "f");
__classPrivateFieldSet(this, _Ad4mClient_expressionClient, new ExpressionClient_1.default(client), "f");
__classPrivateFieldSet(this, _Ad4mClient_languageClient, new LanguageClient_1.LanguageClient(client), "f");
__classPrivateFieldSet(this, _Ad4mClient_neighbourhoodClient, new NeighbourhoodClient_1.default(client), "f");
__classPrivateFieldSet(this, _Ad4mClient_perspectiveClient, new PerspectiveClient_1.default(client), "f");
__classPrivateFieldSet(this, _Ad4mClient_runtimeClient, new RuntimeClient_1.default(client), "f");
}
get agent() {
return __classPrivateFieldGet(this, _agentClient);
return __classPrivateFieldGet(this, _Ad4mClient_agentClient, "f");
}
get expression() {
return __classPrivateFieldGet(this, _expressionClient);
return __classPrivateFieldGet(this, _Ad4mClient_expressionClient, "f");
}
get languages() {
return __classPrivateFieldGet(this, _languageClient);
return __classPrivateFieldGet(this, _Ad4mClient_languageClient, "f");
}
get neighbourhood() {
return __classPrivateFieldGet(this, _neighbourhoodClient);
return __classPrivateFieldGet(this, _Ad4mClient_neighbourhoodClient, "f");
}
get perspective() {
return __classPrivateFieldGet(this, _perspectiveClient);
return __classPrivateFieldGet(this, _Ad4mClient_perspectiveClient, "f");
}
get runtime() {
return __classPrivateFieldGet(this, _runtimeClient);
return __classPrivateFieldGet(this, _Ad4mClient_runtimeClient, "f");
}
}
exports.Ad4mClient = Ad4mClient;
_apolloClient = new WeakMap(), _agentClient = new WeakMap(), _expressionClient = new WeakMap(), _languageClient = new WeakMap(), _neighbourhoodClient = new WeakMap(), _perspectiveClient = new WeakMap(), _runtimeClient = new WeakMap();
_Ad4mClient_apolloClient = new WeakMap(), _Ad4mClient_agentClient = new WeakMap(), _Ad4mClient_expressionClient = new WeakMap(), _Ad4mClient_languageClient = new WeakMap(), _Ad4mClient_neighbourhoodClient = new WeakMap(), _Ad4mClient_perspectiveClient = new WeakMap(), _Ad4mClient_runtimeClient = new WeakMap();
"use strict";
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, privateMap, value) {
if (!privateMap.has(receiver)) {
throw new TypeError("attempted to set private field on non-instance");
}
privateMap.set(receiver, value);
return value;
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
if (kind === "m") throw new TypeError("Private method is not writable");
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
};
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, privateMap) {
if (!privateMap.has(receiver)) {
throw new TypeError("attempted to get private field on non-instance");
}
return privateMap.get(receiver);
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
};

@@ -18,3 +16,3 @@ var __importDefault = (this && this.__importDefault) || function (mod) {

};
var _apolloClient, _updatedCallbacks;
var _AgentClient_apolloClient, _AgentClient_updatedCallbacks;
Object.defineProperty(exports, "__esModule", { value: true });

@@ -53,7 +51,7 @@ const client_1 = require("@apollo/client");

constructor(client) {
_apolloClient.set(this, void 0);
_updatedCallbacks.set(this, void 0);
__classPrivateFieldSet(this, _apolloClient, client);
__classPrivateFieldSet(this, _updatedCallbacks, []);
__classPrivateFieldGet(this, _apolloClient).subscribe({
_AgentClient_apolloClient.set(this, void 0);
_AgentClient_updatedCallbacks.set(this, void 0);
__classPrivateFieldSet(this, _AgentClient_apolloClient, client, "f");
__classPrivateFieldSet(this, _AgentClient_updatedCallbacks, [], "f");
__classPrivateFieldGet(this, _AgentClient_apolloClient, "f").subscribe({
query: client_1.gql ` subscription {

@@ -66,3 +64,3 @@ agentUpdated { ${AGENT_SUBITEMS} }

const agent = result.data.agentUpdated;
__classPrivateFieldGet(this, _updatedCallbacks).forEach(cb => {
__classPrivateFieldGet(this, _AgentClient_updatedCallbacks, "f").forEach(cb => {
cb(agent);

@@ -81,3 +79,3 @@ });

async me() {
const { agent } = unwrapApolloResult_1.default(await __classPrivateFieldGet(this, _apolloClient).query({
const { agent } = unwrapApolloResult_1.default(await __classPrivateFieldGet(this, _AgentClient_apolloClient, "f").query({
query: client_1.gql `query agent { agent { ${AGENT_SUBITEMS} } }`

@@ -90,3 +88,3 @@ }));

async status() {
const { agentStatus } = unwrapApolloResult_1.default(await __classPrivateFieldGet(this, _apolloClient).query({
const { agentStatus } = unwrapApolloResult_1.default(await __classPrivateFieldGet(this, _AgentClient_apolloClient, "f").query({
query: client_1.gql `query agentStatus {

@@ -101,3 +99,3 @@ agentStatus {

async generate(passphrase) {
const { agentGenerate } = unwrapApolloResult_1.default(await __classPrivateFieldGet(this, _apolloClient).mutate({
const { agentGenerate } = unwrapApolloResult_1.default(await __classPrivateFieldGet(this, _AgentClient_apolloClient, "f").mutate({
mutation: client_1.gql `mutation agentGenerate(

@@ -116,3 +114,3 @@ $passphrase: String!

let { did, didDocument, keystore, passphrase } = args;
const { agentImport } = unwrapApolloResult_1.default(await __classPrivateFieldGet(this, _apolloClient).mutate({
const { agentImport } = unwrapApolloResult_1.default(await __classPrivateFieldGet(this, _AgentClient_apolloClient, "f").mutate({
mutation: client_1.gql `mutation agentImport(

@@ -133,3 +131,3 @@ $did: String!,

async lock(passphrase) {
const { agentLock } = unwrapApolloResult_1.default(await __classPrivateFieldGet(this, _apolloClient).mutate({
const { agentLock } = unwrapApolloResult_1.default(await __classPrivateFieldGet(this, _AgentClient_apolloClient, "f").mutate({
mutation: client_1.gql `mutation agentLock($passphrase: String!) {

@@ -145,3 +143,3 @@ agentLock(passphrase: $passphrase) {

async unlock(passphrase) {
const { agentUnlock } = unwrapApolloResult_1.default(await __classPrivateFieldGet(this, _apolloClient).mutate({
const { agentUnlock } = unwrapApolloResult_1.default(await __classPrivateFieldGet(this, _AgentClient_apolloClient, "f").mutate({
mutation: client_1.gql `mutation agentUnlock($passphrase: String!) {

@@ -157,3 +155,3 @@ agentUnlock(passphrase: $passphrase) {

async byDID(did) {
const { agentByDID } = unwrapApolloResult_1.default(await __classPrivateFieldGet(this, _apolloClient).query({
const { agentByDID } = unwrapApolloResult_1.default(await __classPrivateFieldGet(this, _AgentClient_apolloClient, "f").query({
query: client_1.gql `query agentByDID($did: String!) {

@@ -169,3 +167,3 @@ agentByDID(did: $did) {

async updatePublicPerspective(perspective) {
const { agentUpdatePublicPerspective } = unwrapApolloResult_1.default(await __classPrivateFieldGet(this, _apolloClient).mutate({
const { agentUpdatePublicPerspective } = unwrapApolloResult_1.default(await __classPrivateFieldGet(this, _AgentClient_apolloClient, "f").mutate({
mutation: client_1.gql `mutation agentUpdatePublicPerspective($perspective: PerspectiveInput!) {

@@ -184,3 +182,3 @@ agentUpdatePublicPerspective(perspective: $perspective) {

async updateDirectMessageLanguage(directMessageLanguage) {
const { agentUpdateDirectMessageLanguage } = unwrapApolloResult_1.default(await __classPrivateFieldGet(this, _apolloClient).mutate({
const { agentUpdateDirectMessageLanguage } = unwrapApolloResult_1.default(await __classPrivateFieldGet(this, _AgentClient_apolloClient, "f").mutate({
mutation: client_1.gql `mutation agentUpdateDirectMessageLanguage($directMessageLanguage: String!) {

@@ -199,6 +197,6 @@ agentUpdateDirectMessageLanguage(directMessageLanguage: $directMessageLanguage) {

addUpdatedListener(listener) {
__classPrivateFieldGet(this, _updatedCallbacks).push(listener);
__classPrivateFieldGet(this, _AgentClient_updatedCallbacks, "f").push(listener);
}
}
exports.default = AgentClient;
_apolloClient = new WeakMap(), _updatedCallbacks = new WeakMap();
_AgentClient_apolloClient = new WeakMap(), _AgentClient_updatedCallbacks = new WeakMap();
"use strict";
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, privateMap, value) {
if (!privateMap.has(receiver)) {
throw new TypeError("attempted to set private field on non-instance");
}
privateMap.set(receiver, value);
return value;
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
if (kind === "m") throw new TypeError("Private method is not writable");
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
};
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, privateMap) {
if (!privateMap.has(receiver)) {
throw new TypeError("attempted to get private field on non-instance");
}
return privateMap.get(receiver);
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
};

@@ -18,3 +16,3 @@ var __importDefault = (this && this.__importDefault) || function (mod) {

};
var _apolloClient;
var _ExpressionClient_apolloClient;
Object.defineProperty(exports, "__esModule", { value: true });

@@ -25,7 +23,7 @@ const client_1 = require("@apollo/client");

constructor(client) {
_apolloClient.set(this, void 0);
__classPrivateFieldSet(this, _apolloClient, client);
_ExpressionClient_apolloClient.set(this, void 0);
__classPrivateFieldSet(this, _ExpressionClient_apolloClient, client, "f");
}
async get(url) {
const { expression } = unwrapApolloResult_1.default(await __classPrivateFieldGet(this, _apolloClient).query({
const { expression } = unwrapApolloResult_1.default(await __classPrivateFieldGet(this, _ExpressionClient_apolloClient, "f").query({
query: client_1.gql `query expression($url: String!) {

@@ -50,3 +48,3 @@ expression(url: $url) {

async getRaw(url) {
const { expressionRaw } = unwrapApolloResult_1.default(await __classPrivateFieldGet(this, _apolloClient).query({
const { expressionRaw } = unwrapApolloResult_1.default(await __classPrivateFieldGet(this, _ExpressionClient_apolloClient, "f").query({
query: client_1.gql `query expressionRaw($url: String!) {

@@ -61,3 +59,3 @@ expressionRaw(url: $url)

content = JSON.stringify(content);
const { expressionCreate } = unwrapApolloResult_1.default(await __classPrivateFieldGet(this, _apolloClient).mutate({
const { expressionCreate } = unwrapApolloResult_1.default(await __classPrivateFieldGet(this, _ExpressionClient_apolloClient, "f").mutate({
mutation: client_1.gql `mutation expressionCreate($content: String!, $languageAddress: String!){

@@ -72,2 +70,2 @@ expressionCreate(content: $content, languageAddress: $languageAddress)

exports.default = ExpressionClient;
_apolloClient = new WeakMap();
_ExpressionClient_apolloClient = new WeakMap();
"use strict";
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, privateMap, value) {
if (!privateMap.has(receiver)) {
throw new TypeError("attempted to set private field on non-instance");
}
privateMap.set(receiver, value);
return value;
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
if (kind === "m") throw new TypeError("Private method is not writable");
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
};
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, privateMap) {
if (!privateMap.has(receiver)) {
throw new TypeError("attempted to get private field on non-instance");
}
return privateMap.get(receiver);
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
};

@@ -18,3 +16,3 @@ var __importDefault = (this && this.__importDefault) || function (mod) {

};
var _apolloClient;
var _LanguageClient_apolloClient;
Object.defineProperty(exports, "__esModule", { value: true });

@@ -34,7 +32,7 @@ exports.LanguageClient = void 0;

constructor(apolloClient) {
_apolloClient.set(this, void 0);
__classPrivateFieldSet(this, _apolloClient, apolloClient);
_LanguageClient_apolloClient.set(this, void 0);
__classPrivateFieldSet(this, _LanguageClient_apolloClient, apolloClient, "f");
}
async byAddress(address) {
const { language } = unwrapApolloResult_1.default(await __classPrivateFieldGet(this, _apolloClient).query({
const { language } = unwrapApolloResult_1.default(await __classPrivateFieldGet(this, _LanguageClient_apolloClient, "f").query({
query: client_1.gql `query byAddress($address: String!) {

@@ -50,3 +48,3 @@ language(address: $address) {

async byFilter(filter) {
const { languages } = unwrapApolloResult_1.default(await __classPrivateFieldGet(this, _apolloClient).query({
const { languages } = unwrapApolloResult_1.default(await __classPrivateFieldGet(this, _LanguageClient_apolloClient, "f").query({
query: client_1.gql `query byFilter($filter: String!) {

@@ -65,3 +63,3 @@ languages(filter: $filter) {

async writeSettings(languageAddress, settings) {
const { languageWriteSettings } = unwrapApolloResult_1.default(await __classPrivateFieldGet(this, _apolloClient).mutate({
const { languageWriteSettings } = unwrapApolloResult_1.default(await __classPrivateFieldGet(this, _LanguageClient_apolloClient, "f").mutate({
mutation: client_1.gql `mutation writeSettings($languageAddress: String!, $settings: String!) {

@@ -75,3 +73,3 @@ languageWriteSettings(languageAddress: $languageAddress, settings: $settings)

async cloneHolochainTemplate(languagePath, dnaNick, uid) {
const { languageCloneHolochainTemplate } = unwrapApolloResult_1.default(await __classPrivateFieldGet(this, _apolloClient).mutate({
const { languageCloneHolochainTemplate } = unwrapApolloResult_1.default(await __classPrivateFieldGet(this, _LanguageClient_apolloClient, "f").mutate({
mutation: client_1.gql `mutation languageCloneHolochainTemplate(

@@ -92,2 +90,2 @@ $languagePath: String!,

exports.LanguageClient = LanguageClient;
_apolloClient = new WeakMap();
_LanguageClient_apolloClient = new WeakMap();
"use strict";
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, privateMap, value) {
if (!privateMap.has(receiver)) {
throw new TypeError("attempted to set private field on non-instance");
}
privateMap.set(receiver, value);
return value;
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
if (kind === "m") throw new TypeError("Private method is not writable");
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
};
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, privateMap) {
if (!privateMap.has(receiver)) {
throw new TypeError("attempted to get private field on non-instance");
}
return privateMap.get(receiver);
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
};

@@ -18,3 +16,3 @@ var __importDefault = (this && this.__importDefault) || function (mod) {

};
var _apolloClient;
var _NeighbourhoodClient_apolloClient;
Object.defineProperty(exports, "__esModule", { value: true });

@@ -25,7 +23,7 @@ const client_1 = require("@apollo/client");

constructor(client) {
_apolloClient.set(this, void 0);
__classPrivateFieldSet(this, _apolloClient, client);
_NeighbourhoodClient_apolloClient.set(this, void 0);
__classPrivateFieldSet(this, _NeighbourhoodClient_apolloClient, client, "f");
}
async publishFromPerspective(perspectiveUUID, linkLanguage, meta) {
const { neighbourhoodPublishFromPerspective } = unwrapApolloResult_1.default(await __classPrivateFieldGet(this, _apolloClient).mutate({
const { neighbourhoodPublishFromPerspective } = unwrapApolloResult_1.default(await __classPrivateFieldGet(this, _NeighbourhoodClient_apolloClient, "f").mutate({
mutation: client_1.gql `mutation neighbourhoodPublishFromPerspective(

@@ -47,3 +45,3 @@ $linkLanguage: String!,

async joinFromUrl(url) {
const { neighbourhoodJoinFromUrl } = unwrapApolloResult_1.default(await __classPrivateFieldGet(this, _apolloClient).mutate({
const { neighbourhoodJoinFromUrl } = unwrapApolloResult_1.default(await __classPrivateFieldGet(this, _NeighbourhoodClient_apolloClient, "f").mutate({
mutation: client_1.gql ` mutation neighbourhoodJoinFromUrl($url: String!) {

@@ -74,2 +72,2 @@ neighbourhoodJoinFromUrl(url: $url) {

exports.default = NeighbourhoodClient;
_apolloClient = new WeakMap();
_NeighbourhoodClient_apolloClient = new WeakMap();
"use strict";
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, privateMap, value) {
if (!privateMap.has(receiver)) {
throw new TypeError("attempted to set private field on non-instance");
}
privateMap.set(receiver, value);
return value;
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
if (kind === "m") throw new TypeError("Private method is not writable");
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
};
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, privateMap) {
if (!privateMap.has(receiver)) {
throw new TypeError("attempted to get private field on non-instance");
}
return privateMap.get(receiver);
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
};

@@ -18,3 +16,3 @@ var __importDefault = (this && this.__importDefault) || function (mod) {

};
var _apolloClient, _perspectiveAddedCallbacks, _perspectiveUpdatedCallbacks, _perspectiveRemovedCallbacks;
var _PerspectiveClient_apolloClient, _PerspectiveClient_perspectiveAddedCallbacks, _PerspectiveClient_perspectiveUpdatedCallbacks, _PerspectiveClient_perspectiveRemovedCallbacks;
Object.defineProperty(exports, "__esModule", { value: true });

@@ -48,11 +46,11 @@ const client_1 = require("@apollo/client");

constructor(client) {
_apolloClient.set(this, void 0);
_perspectiveAddedCallbacks.set(this, void 0);
_perspectiveUpdatedCallbacks.set(this, void 0);
_perspectiveRemovedCallbacks.set(this, void 0);
__classPrivateFieldSet(this, _apolloClient, client);
__classPrivateFieldSet(this, _perspectiveAddedCallbacks, []);
__classPrivateFieldSet(this, _perspectiveUpdatedCallbacks, []);
__classPrivateFieldSet(this, _perspectiveRemovedCallbacks, []);
__classPrivateFieldGet(this, _apolloClient).subscribe({
_PerspectiveClient_apolloClient.set(this, void 0);
_PerspectiveClient_perspectiveAddedCallbacks.set(this, void 0);
_PerspectiveClient_perspectiveUpdatedCallbacks.set(this, void 0);
_PerspectiveClient_perspectiveRemovedCallbacks.set(this, void 0);
__classPrivateFieldSet(this, _PerspectiveClient_apolloClient, client, "f");
__classPrivateFieldSet(this, _PerspectiveClient_perspectiveAddedCallbacks, [], "f");
__classPrivateFieldSet(this, _PerspectiveClient_perspectiveUpdatedCallbacks, [], "f");
__classPrivateFieldSet(this, _PerspectiveClient_perspectiveRemovedCallbacks, [], "f");
__classPrivateFieldGet(this, _PerspectiveClient_apolloClient, "f").subscribe({
query: client_1.gql ` subscription {

@@ -64,3 +62,3 @@ perspectiveAdded { ${PERSPECTIVE_HANDLE_FIELDS} }

next: result => {
__classPrivateFieldGet(this, _perspectiveAddedCallbacks).forEach(cb => {
__classPrivateFieldGet(this, _PerspectiveClient_perspectiveAddedCallbacks, "f").forEach(cb => {
cb(result.data.perspectiveAdded);

@@ -71,3 +69,3 @@ });

});
__classPrivateFieldGet(this, _apolloClient).subscribe({
__classPrivateFieldGet(this, _PerspectiveClient_apolloClient, "f").subscribe({
query: client_1.gql ` subscription {

@@ -79,3 +77,3 @@ perspectiveUpdated { ${PERSPECTIVE_HANDLE_FIELDS} }

next: result => {
__classPrivateFieldGet(this, _perspectiveUpdatedCallbacks).forEach(cb => {
__classPrivateFieldGet(this, _PerspectiveClient_perspectiveUpdatedCallbacks, "f").forEach(cb => {
cb(result.data.perspectiveUpdated);

@@ -86,3 +84,3 @@ });

});
__classPrivateFieldGet(this, _apolloClient).subscribe({
__classPrivateFieldGet(this, _PerspectiveClient_apolloClient, "f").subscribe({
query: client_1.gql ` subscription {

@@ -94,3 +92,3 @@ perspectiveRemoved

next: result => {
__classPrivateFieldGet(this, _perspectiveRemovedCallbacks).forEach(cb => {
__classPrivateFieldGet(this, _PerspectiveClient_perspectiveRemovedCallbacks, "f").forEach(cb => {
cb(result.data.perspectiveRemoved);

@@ -103,3 +101,3 @@ });

async all() {
const { perspectives } = unwrapApolloResult_1.default(await __classPrivateFieldGet(this, _apolloClient).query({
const { perspectives } = unwrapApolloResult_1.default(await __classPrivateFieldGet(this, _PerspectiveClient_apolloClient, "f").query({
query: client_1.gql `query perspectives {

@@ -115,3 +113,3 @@ perspectives {

async byUUID(uuid) {
const { perspective } = unwrapApolloResult_1.default(await __classPrivateFieldGet(this, _apolloClient).query({
const { perspective } = unwrapApolloResult_1.default(await __classPrivateFieldGet(this, _PerspectiveClient_apolloClient, "f").query({
query: client_1.gql `query perspective($uuid: String!) {

@@ -127,3 +125,3 @@ perspective(uuid: $uuid) {

async snapshotByUUID(uuid) {
const { perspectiveSnapshot } = unwrapApolloResult_1.default(await __classPrivateFieldGet(this, _apolloClient).query({
const { perspectiveSnapshot } = unwrapApolloResult_1.default(await __classPrivateFieldGet(this, _PerspectiveClient_apolloClient, "f").query({
query: client_1.gql `query perspectiveSnapshot($uuid: String!) {

@@ -139,3 +137,3 @@ perspectiveSnapshot(uuid: $uuid) {

async queryLinks(uuid, query) {
const { perspectiveQueryLinks } = unwrapApolloResult_1.default(await __classPrivateFieldGet(this, _apolloClient).query({
const { perspectiveQueryLinks } = unwrapApolloResult_1.default(await __classPrivateFieldGet(this, _PerspectiveClient_apolloClient, "f").query({
query: client_1.gql `query perspectiveQueryLinks($uuid: String!, $query: LinkQuery!) {

@@ -151,3 +149,3 @@ perspectiveQueryLinks(query: $query, uuid: $uuid) {

async add(name) {
const { perspectiveAdd } = unwrapApolloResult_1.default(await __classPrivateFieldGet(this, _apolloClient).mutate({
const { perspectiveAdd } = unwrapApolloResult_1.default(await __classPrivateFieldGet(this, _PerspectiveClient_apolloClient, "f").mutate({
mutation: client_1.gql `mutation perspectiveAdd($name: String!) {

@@ -163,3 +161,3 @@ perspectiveAdd(name: $name) {

async update(uuid, name) {
const { perspectiveUpdate } = unwrapApolloResult_1.default(await __classPrivateFieldGet(this, _apolloClient).mutate({
const { perspectiveUpdate } = unwrapApolloResult_1.default(await __classPrivateFieldGet(this, _PerspectiveClient_apolloClient, "f").mutate({
mutation: client_1.gql `mutation perspectiveUpdate($uuid: String!, $name: String!) {

@@ -175,3 +173,3 @@ perspectiveUpdate(uuid: $uuid, name: $name) {

async remove(uuid) {
return unwrapApolloResult_1.default(await __classPrivateFieldGet(this, _apolloClient).mutate({
return unwrapApolloResult_1.default(await __classPrivateFieldGet(this, _PerspectiveClient_apolloClient, "f").mutate({
mutation: client_1.gql `mutation perspectiveRemove($uuid: String!) {

@@ -184,3 +182,3 @@ perspectiveRemove(uuid: $uuid)

async addLink(uuid, link) {
const { perspectiveAddLink } = unwrapApolloResult_1.default(await __classPrivateFieldGet(this, _apolloClient).mutate({
const { perspectiveAddLink } = unwrapApolloResult_1.default(await __classPrivateFieldGet(this, _PerspectiveClient_apolloClient, "f").mutate({
mutation: client_1.gql `mutation perspectiveAddLink($uuid: String!, $link: LinkInput!){

@@ -196,3 +194,3 @@ perspectiveAddLink(link: $link, uuid: $uuid) {

async updateLink(uuid, oldLink, newLink) {
const { perspectiveUpdateLink } = unwrapApolloResult_1.default(await __classPrivateFieldGet(this, _apolloClient).mutate({
const { perspectiveUpdateLink } = unwrapApolloResult_1.default(await __classPrivateFieldGet(this, _PerspectiveClient_apolloClient, "f").mutate({
mutation: client_1.gql `mutation perspectiveUpdateLink(

@@ -216,3 +214,3 @@ $uuid: String!,

async removeLink(uuid, link) {
return unwrapApolloResult_1.default(await __classPrivateFieldGet(this, _apolloClient).mutate({
return unwrapApolloResult_1.default(await __classPrivateFieldGet(this, _PerspectiveClient_apolloClient, "f").mutate({
mutation: client_1.gql `mutation perspectiveRemoveLink($link: LinkExpressionInput!, $uuid: String!) {

@@ -226,12 +224,12 @@ perspectiveRemoveLink(link: $link, uuid: $uuid)

addPerspectiveAddedListener(cb) {
__classPrivateFieldGet(this, _perspectiveAddedCallbacks).push(cb);
__classPrivateFieldGet(this, _PerspectiveClient_perspectiveAddedCallbacks, "f").push(cb);
}
addPerspectiveUpdatedListener(cb) {
__classPrivateFieldGet(this, _perspectiveUpdatedCallbacks).push(cb);
__classPrivateFieldGet(this, _PerspectiveClient_perspectiveUpdatedCallbacks, "f").push(cb);
}
addPerspectiveRemovedListener(cb) {
__classPrivateFieldGet(this, _perspectiveRemovedCallbacks).push(cb);
__classPrivateFieldGet(this, _PerspectiveClient_perspectiveRemovedCallbacks, "f").push(cb);
}
async addPerspectiveLinkAddedListener(uuid, cb) {
__classPrivateFieldGet(this, _apolloClient).subscribe({
__classPrivateFieldGet(this, _PerspectiveClient_apolloClient, "f").subscribe({
query: client_1.gql ` subscription {

@@ -251,3 +249,3 @@ perspectiveLinkAdded(uuid: "${uuid}") { ${LINK_EXPRESSION_FIELDS} }

async addPerspectiveLinkRemovedListener(uuid, cb) {
__classPrivateFieldGet(this, _apolloClient).subscribe({
__classPrivateFieldGet(this, _PerspectiveClient_apolloClient, "f").subscribe({
query: client_1.gql ` subscription {

@@ -268,2 +266,2 @@ perspectiveLinkRemoved(uuid: "${uuid}") { ${LINK_EXPRESSION_FIELDS} }

exports.default = PerspectiveClient;
_apolloClient = new WeakMap(), _perspectiveAddedCallbacks = new WeakMap(), _perspectiveUpdatedCallbacks = new WeakMap(), _perspectiveRemovedCallbacks = new WeakMap();
_PerspectiveClient_apolloClient = new WeakMap(), _PerspectiveClient_perspectiveAddedCallbacks = new WeakMap(), _PerspectiveClient_perspectiveUpdatedCallbacks = new WeakMap(), _PerspectiveClient_perspectiveRemovedCallbacks = new WeakMap();

@@ -126,3 +126,4 @@ "use strict";

type_graphql_1.Query(returns => [Links_1.LinkExpression], { nullable: true }),
__param(0, type_graphql_1.Arg('uuid')), __param(1, type_graphql_1.Arg('query')),
__param(0, type_graphql_1.Arg('uuid')),
__param(1, type_graphql_1.Arg('query')),
__metadata("design:type", Function),

@@ -141,3 +142,4 @@ __metadata("design:paramtypes", [String, LinkQuery_1.LinkQuery]),

type_graphql_1.Mutation(returns => PerspectiveHandle_1.PerspectiveHandle, { nullable: true }),
__param(0, type_graphql_1.Arg('uuid')), __param(1, type_graphql_1.Arg('name')),
__param(0, type_graphql_1.Arg('uuid')),
__param(1, type_graphql_1.Arg('name')),
__metadata("design:type", Function),

@@ -156,3 +158,4 @@ __metadata("design:paramtypes", [String, String]),

type_graphql_1.Mutation(returns => Links_1.LinkExpression),
__param(0, type_graphql_1.Arg('uuid')), __param(1, type_graphql_1.Arg('link')),
__param(0, type_graphql_1.Arg('uuid')),
__param(1, type_graphql_1.Arg('link')),
__metadata("design:type", Function),

@@ -164,3 +167,5 @@ __metadata("design:paramtypes", [String, Links_1.LinkInput]),

type_graphql_1.Mutation(returns => Links_1.LinkExpression),
__param(0, type_graphql_1.Arg('uuid')), __param(1, type_graphql_1.Arg('oldLink')), __param(2, type_graphql_1.Arg('newLink')),
__param(0, type_graphql_1.Arg('uuid')),
__param(1, type_graphql_1.Arg('oldLink')),
__param(2, type_graphql_1.Arg('newLink')),
__metadata("design:type", Function),

@@ -172,3 +177,4 @@ __metadata("design:paramtypes", [String, Links_1.LinkExpressionInput, Links_1.LinkInput]),

type_graphql_1.Mutation(returns => Boolean),
__param(0, type_graphql_1.Arg('uuid')), __param(1, type_graphql_1.Arg('link')),
__param(0, type_graphql_1.Arg('uuid')),
__param(1, type_graphql_1.Arg('link')),
__metadata("design:type", Function),

@@ -175,0 +181,0 @@ __metadata("design:paramtypes", [String, Links_1.LinkExpressionInput]),

"use strict";
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, privateMap, value) {
if (!privateMap.has(receiver)) {
throw new TypeError("attempted to set private field on non-instance");
}
privateMap.set(receiver, value);
return value;
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
if (kind === "m") throw new TypeError("Private method is not writable");
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
};
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, privateMap) {
if (!privateMap.has(receiver)) {
throw new TypeError("attempted to get private field on non-instance");
}
return privateMap.get(receiver);
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
};

@@ -18,3 +16,3 @@ var __importDefault = (this && this.__importDefault) || function (mod) {

};
var _apolloClient;
var _RuntimeClient_apolloClient;
Object.defineProperty(exports, "__esModule", { value: true });

@@ -25,7 +23,7 @@ const client_1 = require("@apollo/client");

constructor(client) {
_apolloClient.set(this, void 0);
__classPrivateFieldSet(this, _apolloClient, client);
_RuntimeClient_apolloClient.set(this, void 0);
__classPrivateFieldSet(this, _RuntimeClient_apolloClient, client, "f");
}
async quit() {
const result = unwrapApolloResult_1.default(await __classPrivateFieldGet(this, _apolloClient).mutate({
const result = unwrapApolloResult_1.default(await __classPrivateFieldGet(this, _RuntimeClient_apolloClient, "f").mutate({
mutation: client_1.gql `mutation runtimeQuit { runtimeQuit }`

@@ -36,3 +34,3 @@ }));

async openLink(url) {
const { runtimeOpenLink } = unwrapApolloResult_1.default(await __classPrivateFieldGet(this, _apolloClient).mutate({
const { runtimeOpenLink } = unwrapApolloResult_1.default(await __classPrivateFieldGet(this, _RuntimeClient_apolloClient, "f").mutate({
mutation: client_1.gql `mutation runtimeOpenLink($url: String!) {

@@ -47,2 +45,2 @@ runtimeOpenLink(url: $url)

exports.default = RuntimeClient;
_apolloClient = new WeakMap();
_RuntimeClient_apolloClient = new WeakMap();
{
"name": "@perspect3vism/ad4m",
"version": "0.1.6",
"version": "0.1.7",
"description": "*The Agent-Centric Distributed Application Meta-ontology* or just: *Agent-Centric DApp Meta-ontology* * A new meta-ontology for interoperable, decentralized application design * A spanning-layer to enable seamless integration between Holochain DNAs, blockchains, linked-data structures/ontologies and centralized back-ends * The basis for turning distinct, monolithic and siloed apps into a global, open and interoperable sense-making network",

@@ -32,2 +32,3 @@ "main": "lib/index.js",

"dependencies": {
"@apollo/client": "3.3.20",
"@holochain/conductor-api": "0.0.4",

@@ -39,6 +40,6 @@ "@types/jest": "^26.0.15",

"reflect-metadata": "^0.1.13",
"type-graphql": "^1.1.1"
"type-graphql": "^1.1.1",
"react": "^17.0.2"
},
"devDependencies": {
"@apollo/client": "^3.3.20",
"@apollo/link-error": "^2.0.0-beta.3",

@@ -48,3 +49,2 @@ "@types/reflect-metadata": "^0.1.0",

"cross-fetch": "^3.1.4",
"react": "^17.0.2",
"ts-jest": "^27.0.3",

@@ -51,0 +51,0 @@ "jest": "^27.0.4",

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