prefix logs with rz:
This commit is contained in:
parent
1f8cbda73f
commit
6678176326
|
@ -9,6 +9,7 @@ describe('Run', () => {
|
||||||
httpEnable: true,
|
httpEnable: true,
|
||||||
requestBindPort: 5001,
|
requestBindPort: 5001,
|
||||||
publishBindPort: 5002,
|
publishBindPort: 5002,
|
||||||
|
peerId: 'app-001',
|
||||||
});
|
});
|
||||||
await app.start();
|
await app.start();
|
||||||
});
|
});
|
||||||
|
|
|
@ -8,11 +8,11 @@ describe('Run', () => {
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
apps[0] = new App({
|
apps[0] = new App({
|
||||||
httpEnable: true,
|
httpEnable: true,
|
||||||
peerId: 'app0',
|
peerId: 'app-002-A',
|
||||||
});
|
});
|
||||||
apps[1] = new App({
|
apps[1] = new App({
|
||||||
httpEnable: true,
|
httpEnable: true,
|
||||||
peerId: 'app1',
|
peerId: 'app-002-B',
|
||||||
// Make the apps use the same pubsub topic so they can talk to each other
|
// Make the apps use the same pubsub topic so they can talk to each other
|
||||||
pubSubTopic: apps[0].config.pubSubTopic,
|
pubSubTopic: apps[0].config.pubSubTopic,
|
||||||
});
|
});
|
||||||
|
|
|
@ -11,7 +11,7 @@ import {Entity, EntityProperties} from "./entity.js";
|
||||||
import {Lossy, ResolvedViewOne, Resolver} from "./lossy.js";
|
import {Lossy, ResolvedViewOne, Resolver} from "./lossy.js";
|
||||||
import {RhizomeNode} from "./node.js";
|
import {RhizomeNode} from "./node.js";
|
||||||
import {DomainEntityID} from "./types.js";
|
import {DomainEntityID} from "./types.js";
|
||||||
const debug = Debug('collection');
|
const debug = Debug('rz:collection');
|
||||||
|
|
||||||
export class Collection {
|
export class Collection {
|
||||||
rhizomeNode?: RhizomeNode;
|
rhizomeNode?: RhizomeNode;
|
||||||
|
|
|
@ -3,7 +3,7 @@ import EventEmitter from 'node:events';
|
||||||
import objectHash from 'object-hash';
|
import objectHash from 'object-hash';
|
||||||
import {Delta, DeltaNetworkImage} from './delta.js';
|
import {Delta, DeltaNetworkImage} from './delta.js';
|
||||||
import {RhizomeNode} from './node.js';
|
import {RhizomeNode} from './node.js';
|
||||||
const debug = Debug('deltas');
|
const debug = Debug('rz:deltas');
|
||||||
|
|
||||||
enum Decision {
|
enum Decision {
|
||||||
Accept,
|
Accept,
|
||||||
|
|
|
@ -4,7 +4,7 @@ import {Server} from "http";
|
||||||
import {RhizomeNode} from "../node.js";
|
import {RhizomeNode} from "../node.js";
|
||||||
import {HttpApi} from "./api.js";
|
import {HttpApi} from "./api.js";
|
||||||
import {HttpHtml} from "./html.js";
|
import {HttpHtml} from "./html.js";
|
||||||
const debug = Debug('http-api');
|
const debug = Debug('rz:http-api');
|
||||||
|
|
||||||
export class HttpServer {
|
export class HttpServer {
|
||||||
app = express();
|
app = express();
|
||||||
|
|
|
@ -7,7 +7,7 @@ import {Delta, DeltaFilter, DeltaNetworkImage} from './delta.js';
|
||||||
import {Transactions} from './transactions.js';
|
import {Transactions} from './transactions.js';
|
||||||
import {DomainEntityID, PropertyID, PropertyTypes, TransactionID, ViewMany} from "./types.js";
|
import {DomainEntityID, PropertyID, PropertyTypes, TransactionID, ViewMany} from "./types.js";
|
||||||
import {RhizomeNode} from './node.js';
|
import {RhizomeNode} from './node.js';
|
||||||
const debug = Debug('lossless');
|
const debug = Debug('rz:lossless');
|
||||||
|
|
||||||
export type CollapsedPointer = {[key: PropertyID]: PropertyTypes};
|
export type CollapsedPointer = {[key: PropertyID]: PropertyTypes};
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
import {DeltaFilter} from "./delta.js";
|
import {DeltaFilter} from "./delta.js";
|
||||||
import {CollapsedDelta, Lossless, LosslessViewMany, LosslessViewOne} from "./lossless.js";
|
import {CollapsedDelta, Lossless, LosslessViewMany, LosslessViewOne} from "./lossless.js";
|
||||||
import {DomainEntityID, PropertyID, PropertyTypes, Timestamp, ViewMany} from "./types.js";
|
import {DomainEntityID, PropertyID, PropertyTypes, Timestamp, ViewMany} from "./types.js";
|
||||||
// const debug = Debug('lossy');
|
// const debug = Debug('rz:lossy');
|
||||||
|
|
||||||
type TimestampedProperty = {
|
type TimestampedProperty = {
|
||||||
value: PropertyTypes,
|
value: PropertyTypes,
|
||||||
|
|
|
@ -7,7 +7,7 @@ import {Peers} from './peers.js';
|
||||||
import {PubSub} from './pub-sub.js';
|
import {PubSub} from './pub-sub.js';
|
||||||
import {RequestReply} from './request-reply.js';
|
import {RequestReply} from './request-reply.js';
|
||||||
import {PeerAddress} from './types.js';
|
import {PeerAddress} from './types.js';
|
||||||
const debug = Debug('rhizome-node');
|
const debug = Debug('rz:rhizome-node');
|
||||||
|
|
||||||
export type RhizomeNodeConfig = {
|
export type RhizomeNodeConfig = {
|
||||||
requestBindAddr: string;
|
requestBindAddr: string;
|
||||||
|
|
|
@ -6,7 +6,7 @@ import {RhizomeNode} from "./node.js";
|
||||||
import {Subscription} from './pub-sub.js';
|
import {Subscription} from './pub-sub.js';
|
||||||
import {PeerRequest, RequestSocket, ResponseSocket} from "./request-reply.js";
|
import {PeerRequest, RequestSocket, ResponseSocket} from "./request-reply.js";
|
||||||
import {PeerAddress} from "./types.js";
|
import {PeerAddress} from "./types.js";
|
||||||
const debug = Debug('peers');
|
const debug = Debug('rz:peers');
|
||||||
|
|
||||||
export enum RequestMethods {
|
export enum RequestMethods {
|
||||||
GetPublishAddress,
|
GetPublishAddress,
|
||||||
|
|
|
@ -10,7 +10,7 @@ import {Libp2p, createLibp2p} from 'libp2p';
|
||||||
import {Publisher, Subscriber} from 'zeromq';
|
import {Publisher, Subscriber} from 'zeromq';
|
||||||
import {RhizomeNode} from './node.js';
|
import {RhizomeNode} from './node.js';
|
||||||
import {PeerAddress} from './types.js';
|
import {PeerAddress} from './types.js';
|
||||||
const debug = Debug('pub-sub');
|
const debug = Debug('rz:pub-sub');
|
||||||
|
|
||||||
export type SubscribedMessageHandler = (sender: PeerAddress, msg: string) => void;
|
export type SubscribedMessageHandler = (sender: PeerAddress, msg: string) => void;
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ import {Message, Reply, Request} from 'zeromq';
|
||||||
import {RhizomeNode} from './node.js';
|
import {RhizomeNode} from './node.js';
|
||||||
import {RequestMethods} from './peers.js';
|
import {RequestMethods} from './peers.js';
|
||||||
import {PeerAddress} from './types.js';
|
import {PeerAddress} from './types.js';
|
||||||
const debug = Debug('request-reply');
|
const debug = Debug('rz:request-reply');
|
||||||
|
|
||||||
export type PeerRequest = {
|
export type PeerRequest = {
|
||||||
method: RequestMethods;
|
method: RequestMethods;
|
||||||
|
|
|
@ -3,7 +3,7 @@ import EventEmitter from "events";
|
||||||
import {Delta, DeltaID} from "./delta.js";
|
import {Delta, DeltaID} from "./delta.js";
|
||||||
import {DomainEntityID, TransactionID} from "./types.js";
|
import {DomainEntityID, TransactionID} from "./types.js";
|
||||||
import {Lossless} from "./lossless.js";
|
import {Lossless} from "./lossless.js";
|
||||||
const debug = Debug("transactions");
|
const debug = Debug('rz:transactions');
|
||||||
|
|
||||||
function getDeltaTransactionId(delta: Delta): TransactionID | undefined {
|
function getDeltaTransactionId(delta: Delta): TransactionID | undefined {
|
||||||
const {target: transactionId} = delta.pointers.find(({
|
const {target: transactionId} = delta.pointers.find(({
|
||||||
|
|
|
@ -4,7 +4,7 @@ import path, {join} from "path";
|
||||||
import showdown from "showdown";
|
import showdown from "showdown";
|
||||||
import {RhizomeNode} from "../node.js";
|
import {RhizomeNode} from "../node.js";
|
||||||
const {Converter} = showdown;
|
const {Converter} = showdown;
|
||||||
const debug = Debug('md-files');
|
const debug = Debug('rz:md-files');
|
||||||
|
|
||||||
const docConverter = new Converter({
|
const docConverter = new Converter({
|
||||||
completeHTMLDocument: true,
|
completeHTMLDocument: true,
|
||||||
|
|
Loading…
Reference in New Issue