syndicate-js/packages/core/src/index.ts

35 lines
1.3 KiB
TypeScript
Raw Normal View History

2021-12-01 16:24:29 +00:00
/// SPDX-License-Identifier: GPL-3.0-or-later
2023-01-17 10:43:15 +00:00
/// SPDX-FileCopyrightText: Copyright © 2016-2023 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
2018-11-01 14:55:45 +00:00
export * from '@preserves/core';
2021-12-02 15:04:07 +00:00
export * as Schemas from './schemas.js';
export { Observe, asObserve, toObserve, fromObserve } from './gen/dataspace.js';
export * as DataspacePatterns from './gen/dataspacePatterns.js';
2021-12-01 16:13:00 +00:00
export * from './runtime/actor.js';
2021-12-02 15:04:07 +00:00
export * from './runtime/bag.js';
export * as Dataflow from './runtime/dataflow.js';
export * from './runtime/dataspace.js';
2021-12-02 15:04:07 +00:00
export * as Pattern from './runtime/pattern.js';
2021-12-09 17:53:41 +00:00
export * as QuasiValue from './runtime/quasivalue.js';
2021-12-02 15:04:07 +00:00
export * from './runtime/randomid.js';
export * as Rewrite from './runtime/rewrite.js';
export * as Skeleton from './runtime/skeleton.js';
2021-12-12 22:03:22 +00:00
export * from './runtime/supervise.js';
2021-12-02 15:04:07 +00:00
export * as Task from './runtime/task.js';
export * as Cryptography from './transport/cryptography.js';
export * as WireProtocol from './transport/protocol.js';
export * as Relay from './transport/relay.js';
export * as Sturdy from './transport/sturdy.js';
2018-09-09 17:13:57 +00:00
import { randomId } from './runtime/randomid.js';
2018-09-09 17:13:57 +00:00
// These aren't so much "Universal" as they are "VM-wide-unique".
let uuidIndex = 0;
let uuidInstance = randomId(8);
export function genUuid(prefix: string = '__@syndicate'): string {
return `${prefix}_${uuidInstance}_${uuidIndex++}`;
}