2021-12-01 16:24:29 +00:00
|
|
|
/// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
/// SPDX-FileCopyrightText: Copyright © 2016-2021 Tony Garnock-Jones <tonyg@leastfixedpoint.com>
|
2018-11-01 14:55:45 +00:00
|
|
|
|
2021-05-17 14:26:01 +00:00
|
|
|
export * from '@preserves/core';
|
2019-06-14 14:33:02 +00:00
|
|
|
|
2021-01-11 22:35:36 +00:00
|
|
|
export * from './runtime/randomid.js';
|
|
|
|
export * from './runtime/bag.js';
|
2021-01-16 16:46:18 +00:00
|
|
|
export * as API from './runtime/api.js';
|
2021-01-11 22:35:36 +00:00
|
|
|
export * as Skeleton from './runtime/skeleton.js';
|
2021-12-01 16:13:00 +00:00
|
|
|
export * from './runtime/actor.js';
|
2021-01-11 22:35:36 +00:00
|
|
|
export * from './runtime/dataspace.js';
|
2018-09-09 17:13:57 +00:00
|
|
|
|
2021-01-11 22:35:36 +00:00
|
|
|
import { randomId } from './runtime/randomid.js';
|
2018-09-09 17:13:57 +00:00
|
|
|
|
2021-01-11 22:35:36 +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++}`;
|
|
|
|
}
|